diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index 306934ee2..6bca4f929 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -8,7 +8,7 @@
* [depot_tools](#recipe_modules-depot_tools) (Python3 ✅) — The `depot_tools` module provides safe functions to access paths within the depot_tools repo.
* [gclient](#recipe_modules-gclient) (Python3 ✅)
* [gerrit](#recipe_modules-gerrit) (Python3 ✅)
- * [git](#recipe_modules-git)
+ * [git](#recipe_modules-git) (Python3 ✅)
* [git_cl](#recipe_modules-git_cl) (Python3 ✅)
* [gitiles](#recipe_modules-gitiles) (Python3 ✅)
* [gsutil](#recipe_modules-gsutil) (Python3 ✅)
@@ -30,7 +30,7 @@
* [gclient:tests/patch_project](#recipes-gclient_tests_patch_project) (Python3 ✅)
* [gclient:tests/sync_failure](#recipes-gclient_tests_sync_failure) (Python3 ✅)
* [gerrit:examples/full](#recipes-gerrit_examples_full) (Python3 ✅)
- * [git:examples/full](#recipes-git_examples_full)
+ * [git:examples/full](#recipes-git_examples_full) (Python3 ✅)
* [git_cl:examples/full](#recipes-git_cl_examples_full) (Python3 ✅)
* [gitiles:examples/full](#recipes-gitiles_examples_full) (Python3 ✅)
* [gitiles:tests/parse_repo_url](#recipes-gitiles_tests_parse_repo_url) (Python3 ✅)
@@ -478,9 +478,9 @@ Returns:
https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#submit-change
### *recipe_modules* / [git](/recipes/recipe_modules/git)
-[DEPS](/recipes/recipe_modules/git/__init__.py#1): [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step]
+[DEPS](/recipes/recipe_modules/git/__init__.py#3): [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/runtime][recipe_engine/recipe_modules/runtime], [recipe\_engine/step][recipe_engine/recipe_modules/step]
-PYTHON_VERSION_COMPATIBILITY: PY2
+PYTHON_VERSION_COMPATIBILITY: PY2+3
#### **class [GitApi](/recipes/recipe_modules/git/api.py#18)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
@@ -488,7 +488,7 @@ PYTHON_VERSION_COMPATIBILITY: PY2
Returns a git command step.
-— **def [bundle\_create](/recipes/recipe_modules/git/api.py#388)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
+— **def [bundle\_create](/recipes/recipe_modules/git/api.py#389)(self, bundle_path, rev_list_args=None, \*\*kwargs):**
Runs 'git bundle create' on a Git repository.
@@ -502,7 +502,7 @@ Args:
Outputs the contents of a file at a given revision.
-— **def [checkout](/recipes/recipe_modules/git/api.py#121)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False, progress=True, tags=False):**
+— **def [checkout](/recipes/recipe_modules/git/api.py#122)(self, url, ref=None, dir_path=None, recursive=False, submodules=True, submodule_update_force=False, keep_paths=None, step_suffix=None, curl_trace_file=None, can_fail_build=True, set_got_revision=False, remote_name=None, display_fetch_size=None, file_name=None, submodule_update_recursive=True, use_git_cache=False, progress=True, tags=False):**
Performs a full git checkout and returns sha1 of checked out revision.
@@ -541,7 +541,7 @@ Args:
Returns: If the checkout was successful, this returns the commit hash of
the checked-out-repo. Otherwise this returns None.
-— **def [config\_get](/recipes/recipe_modules/git/api.py#357)(self, prop_name, \*\*kwargs):**
+— **def [config\_get](/recipes/recipe_modules/git/api.py#358)(self, prop_name, \*\*kwargs):**
Returns git config output.
@@ -568,7 +568,7 @@ Returns:
Fetches all tags from the remote.
-— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#376)(self, remote_name=None, \*\*kwargs):**
+— **def [get\_remote\_url](/recipes/recipe_modules/git/api.py#377)(self, remote_name=None, \*\*kwargs):**
Returns the remote Git repository URL, or None.
@@ -578,11 +578,11 @@ Args:
Returns: (str) The URL of the remote Git repository, or None.
-— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#328)(self, commit='HEAD', test_data=None, \*\*kwargs):**
+— **def [get\_timestamp](/recipes/recipe_modules/git/api.py#329)(self, commit='HEAD', test_data=None, \*\*kwargs):**
Find and return the timestamp of the given commit.
-— **def [new\_branch](/recipes/recipe_modules/git/api.py#401)(self, branch, name=None, upstream=None, upstream_current=False, \*\*kwargs):**
+— **def [new\_branch](/recipes/recipe_modules/git/api.py#402)(self, branch, name=None, upstream=None, upstream_current=False, \*\*kwargs):**
Runs git new-branch on a Git repository, to be used before git cl
upload.
@@ -594,7 +594,7 @@ Args:
* upstream_current (bool): whether to use '--upstream_current'.
* kwargs: Forwarded to '__call__'.
-— **def [rebase](/recipes/recipe_modules/git/api.py#337)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
+— **def [rebase](/recipes/recipe_modules/git/api.py#338)(self, name_prefix, branch, dir_path, remote_name=None, \*\*kwargs):**
Runs rebase HEAD onto branch
@@ -1141,11 +1141,11 @@ PYTHON_VERSION_COMPATIBILITY: PY2+3
— **def [RunSteps](/recipes/recipe_modules/gerrit/examples/full.py#13)(api):**
### *recipes* / [git:examples/full](/recipes/recipe_modules/git/examples/full.py)
-[DEPS](/recipes/recipe_modules/git/examples/full.py#5): [git](#recipe_modules-git), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
+[DEPS](/recipes/recipe_modules/git/examples/full.py#7): [git](#recipe_modules-git), [recipe\_engine/buildbucket][recipe_engine/recipe_modules/buildbucket], [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/platform][recipe_engine/recipe_modules/platform], [recipe\_engine/properties][recipe_engine/recipe_modules/properties], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
-PYTHON_VERSION_COMPATIBILITY: PY2
+PYTHON_VERSION_COMPATIBILITY: PY2+3
-— **def [RunSteps](/recipes/recipe_modules/git/examples/full.py#18)(api):**
+— **def [RunSteps](/recipes/recipe_modules/git/examples/full.py#20)(api):**
### *recipes* / [git\_cl:examples/full](/recipes/recipe_modules/git_cl/examples/full.py)
[DEPS](/recipes/recipe_modules/git_cl/examples/full.py#11): [git\_cl](#recipe_modules-git_cl), [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/raw\_io][recipe_engine/recipe_modules/raw_io], [recipe\_engine/step][recipe_engine/recipe_modules/step]
diff --git a/recipes/recipe_modules/git/__init__.py b/recipes/recipe_modules/git/__init__.py
index cbf5fcb58..8e6c8e090 100644
--- a/recipes/recipe_modules/git/__init__.py
+++ b/recipes/recipe_modules/git/__init__.py
@@ -1,3 +1,5 @@
+PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
+
DEPS = [
'recipe_engine/buildbucket',
'recipe_engine/context',
diff --git a/recipes/recipe_modules/git/api.py b/recipes/recipe_modules/git/api.py
index a252149b5..50b10d67f 100644
--- a/recipes/recipe_modules/git/api.py
+++ b/recipes/recipe_modules/git/api.py
@@ -83,6 +83,7 @@ class GitApi(recipe_api.RecipeApi):
result = {}
for line in step_result.stdout.splitlines():
+ line = line.decode('utf-8')
name, value = line.split(':', 1)
result[name] = int(value.strip())
@@ -297,7 +298,7 @@ class GitApi(recipe_api.RecipeApi):
self.m.raw_io.test_api.stream_output('deadbeef'))
if rev_parse_step.presentation.status == 'SUCCESS':
- sha = rev_parse_step.stdout.strip()
+ sha = rev_parse_step.stdout.strip().decode('utf-8')
retVal = sha
rev_parse_step.presentation.step_text = "
checked out %r
" % sha
if set_got_revision:
@@ -370,7 +371,7 @@ class GitApi(recipe_api.RecipeApi):
value = result.stdout
if value:
value = value.strip()
- result.presentation.step_text = value
+ result.presentation.step_text = value.decode('utf-8')
return value
def get_remote_url(self, remote_name=None, **kwargs):
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic.json b/recipes/recipe_modules/git/examples/full.expected/basic.json
index 6a022e63e..4ee3317a7 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_branch.json b/recipes/recipe_modules/git/examples/full.expected/basic_branch.json
index e20ca3d7b..b4c761c23 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_branch.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_branch.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json b/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json
index 4eabc537e..49d4c7bd4 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_file_name.json
@@ -50,7 +50,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_hash.json b/recipes/recipe_modules/git/examples/full.expected/basic_hash.json
index 08b4d3d11..6508db903 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_hash.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_hash.json
@@ -47,7 +47,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_ref.json b/recipes/recipe_modules/git/examples/full.expected/basic_ref.json
index d6ea05339..6681c6454 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_ref.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_ref.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json b/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json
index c72256fc0..fe3cab5a0 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_submodule_update_force.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/basic_tags.json b/recipes/recipe_modules/git/examples/full.expected/basic_tags.json
index b2926d733..0b618697d 100644
--- a/recipes/recipe_modules/git/examples/full.expected/basic_tags.json
+++ b/recipes/recipe_modules/git/examples/full.expected/basic_tags.json
@@ -49,7 +49,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json b/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json
index d1172b7f3..8117a786d 100644
--- a/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json
+++ b/recipes/recipe_modules/git/examples/full.expected/can_fail_build.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json b/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json
index 6d335830b..231064119 100644
--- a/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json
+++ b/recipes/recipe_modules/git/examples/full.expected/cannot_fail_build.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json b/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json
index 56df00453..aae06f63b 100644
--- a/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json
+++ b/recipes/recipe_modules/git/examples/full.expected/cat-file_test.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json
index 754e6bd86..7f8382acb 100644
--- a/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json
+++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_delta.json
@@ -121,7 +121,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json
index 812c6fae0..942455d43 100644
--- a/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json
+++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_failed.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json
index 5be3c590b..06f007e69 100644
--- a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json
+++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json
index 01c342906..35073f07d 100644
--- a/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json
+++ b/recipes/recipe_modules/git/examples/full.expected/count-objects_with_bad_output_fails_build.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json b/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json
index 2dfdbfac8..42414d46d 100644
--- a/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json
+++ b/recipes/recipe_modules/git/examples/full.expected/curl_trace_file.json
@@ -49,7 +49,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json b/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json
index bd52292cb..9cc017bba 100644
--- a/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json
+++ b/recipes/recipe_modules/git/examples/full.expected/git-cache-checkout.json
@@ -96,7 +96,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/new_branch_failed.json b/recipes/recipe_modules/git/examples/full.expected/new_branch_failed.json
index 57d405ebf..56d2f1735 100644
--- a/recipes/recipe_modules/git/examples/full.expected/new_branch_failed.json
+++ b/recipes/recipe_modules/git/examples/full.expected/new_branch_failed.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
@@ -182,9 +182,9 @@
"The recipe has crashed at point 'Uncaught exception'!",
"",
"Traceback (most recent call last):",
- " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/examples/full.py\", line 83, in RunSteps",
+ " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/examples/full.py\", line 85, in RunSteps",
" upstream_current=True)",
- " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/api.py\", line 418, in new_branch",
+ " File \"RECIPE_REPO[depot_tools]/recipes/recipe_modules/git/api.py\", line 419, in new_branch",
" raise ValueError('Can not define both upstream and upstream_current')",
"ValueError: Can not define both upstream and upstream_current"
]
diff --git a/recipes/recipe_modules/git/examples/full.expected/platform_win.json b/recipes/recipe_modules/git/examples/full.expected/platform_win.json
index b8a3e5235..220685273 100644
--- a/recipes/recipe_modules/git/examples/full.expected/platform_win.json
+++ b/recipes/recipe_modules/git/examples/full.expected/platform_win.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json b/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json
index ff83b4585..18112c571 100644
--- a/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json
+++ b/recipes/recipe_modules/git/examples/full.expected/rebase_failed.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json b/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json
index f05334816..323b71e3d 100644
--- a/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json
+++ b/recipes/recipe_modules/git/examples/full.expected/remote_not_origin.json
@@ -50,7 +50,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@"
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@"
]
},
{
diff --git a/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json b/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json
index cc19b5b9e..9f1fcebbd 100644
--- a/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json
+++ b/recipes/recipe_modules/git/examples/full.expected/set_got_revision.json
@@ -48,7 +48,7 @@
"infra_step": true,
"name": "read revision",
"~followup_annotations": [
- "@@@STEP_TEXT@
checked out 'deadbeef'
@@@",
+ "@@@STEP_TEXT@
checked out u'deadbeef'
@@@",
"@@@SET_BUILD_PROPERTY@got_revision@\"deadbeef\"@@@"
]
},
diff --git a/recipes/recipe_modules/git/examples/full.py b/recipes/recipe_modules/git/examples/full.py
index d7ce60a2b..b59a73031 100644
--- a/recipes/recipe_modules/git/examples/full.py
+++ b/recipes/recipe_modules/git/examples/full.py
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
+
DEPS = [
'recipe_engine/buildbucket',
'recipe_engine/context',
@@ -94,7 +96,7 @@ def RunSteps(api):
step_result = api.git.cat_file_at_commit(api.properties['cat_file'],
revision,
stdout=api.raw_io.output())
- if 'TestOutput' in step_result.stdout:
+ if 'TestOutput' in step_result.stdout.decode('utf-8'):
pass # Success!
# Bundle the repository.