Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2014)

Unified Diff: recipe_modules/git/example.py

Issue 1693993002: Make git.checkout return the commit hash. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « recipe_modules/git/api.py ('k') | recipe_modules/git/example.expected/basic.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/git/example.py
diff --git a/recipe_modules/git/example.py b/recipe_modules/git/example.py
index dc9fe0a8772dbb46fceabadc4ab42432e4b8677e..066785a2a3c00cc8dff2a4f69912cd24346f0d62 100644
--- a/recipe_modules/git/example.py
+++ b/recipe_modules/git/example.py
@@ -26,7 +26,7 @@ def RunSteps(api):
True)
# You can use api.git.checkout to perform all the steps of a safe checkout.
- api.git.checkout(
+ retVal = api.git.checkout(
url,
ref=api.properties.get('revision'),
recursive=True,
@@ -38,6 +38,9 @@ def RunSteps(api):
file_name=api.properties.get('checkout_file_name'),
submodule_update_recursive=submodule_update_recursive)
+ assert retVal == "deadbeef", (
+ "expected retVal to be %r but was %r" % ("deadbeef", retVal))
+
# count_objects shows number and size of objects in .git dir.
api.git.count_objects(
name='count-objects',
@@ -106,10 +109,8 @@ def GenTests(api):
)
yield (
- api.test('set_got_revision') +
- api.properties(set_got_revision=True) +
- api.step_data('set got_revision',
- stdout=api.raw_io.output('deadbeef'))
+ api.test('set_got_revision') +
+ api.properties(set_got_revision=True)
)
yield (
« no previous file with comments | « recipe_modules/git/api.py ('k') | recipe_modules/git/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698