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

Unified Diff: tests/fake_repos.py

Issue 2285003: Add more smoke test for gclient config and gclient revinfo. (Closed)
Patch Set: Created 10 years, 7 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 | « gclient.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/fake_repos.py
diff --git a/tests/fake_repos.py b/tests/fake_repos.py
index e55b776b2a472a2051cf277112e13157085d5503..85746cf3ab0faf23401d01df8ae6486e50414d53 100755
--- a/tests/fake_repos.py
+++ b/tests/fake_repos.py
@@ -89,8 +89,9 @@ def commit_svn(repo):
def commit_git(repo):
"""Commits the changes and returns the new hash."""
check_call(['git', 'add', '-A', '-f'], cwd=repo)
- out = Popen(['git', 'commit', '-m', 'foo'], cwd=repo).communicate()[0]
- rev = re.search(r'^\[.*? ([a-f\d]+)\] ', out).group(1)
+ check_call(['git', 'commit', '-q', '--message', 'foo'], cwd=repo)
+ rev = Popen(['git', 'show-ref', '--head', 'HEAD'],
+ cwd=repo).communicate()[0].split(' ', 1)[0]
logging.debug('At revision %s' % rev)
return rev
« no previous file with comments | « gclient.py ('k') | tests/gclient_smoketest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698