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

Unified Diff: tests/git_cl_test.py

Issue 12388027: git cl upload now diffs HEAD rather than working tree (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 7 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 | « git_cl.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/git_cl_test.py
diff --git a/tests/git_cl_test.py b/tests/git_cl_test.py
index 4b089b3debcb4910297e4056a57330869d9736e2..d8ee31722293ef8a388a5dacbe76f9fd94d9235b 100755
--- a/tests/git_cl_test.py
+++ b/tests/git_cl_test.py
@@ -120,10 +120,10 @@ class TestGitCl(TestCase):
if find_copies:
stat_call = ((['git', 'diff', '--no-ext-diff', '--stat',
'--find-copies-harder', '-l100000', '-C'+similarity,
- 'fake_ancestor_sha'],), '+dat')
+ 'fake_ancestor_sha', 'HEAD'],), '+dat')
else:
stat_call = ((['git', 'diff', '--no-ext-diff', '--stat',
- '-M'+similarity, 'fake_ancestor_sha'],), '+dat')
+ '-M'+similarity, 'fake_ancestor_sha', 'HEAD'],), '+dat')
return [
((['git', 'config', 'rietveld.server'],), 'codereview.example.com'),
@@ -149,7 +149,7 @@ class TestGitCl(TestCase):
((['git', 'config', 'user.email'],), 'me@example.com'),
stat_call,
((['git', 'config', 'gerrit.host'],), ''),
- ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..'],),
+ ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..HEAD'],),
'desc\n'),
]
@@ -287,7 +287,7 @@ class TestGitCl(TestCase):
'--cc', 'joe@example.com',
'--git_similarity', similarity or '50'
] + (['--git_no_find_copies'] if find_copies == False else []) + [
- 'fake_ancestor_sha'
+ 'fake_ancestor_sha', 'HEAD'
]
def _run_reviewer_test(
@@ -457,7 +457,7 @@ class TestGitCl(TestCase):
'foo'),
((['git', 'config', 'user.email'],), 'me@example.com'),
((['git', 'diff', '--no-ext-diff', '--stat', '--find-copies-harder',
- '-l100000', '-C50', 'fake_ancestor_sha'],),
+ '-l100000', '-C50', 'fake_ancestor_sha', 'HEAD'],),
'+dat'),
]
@@ -465,16 +465,19 @@ class TestGitCl(TestCase):
def _gerrit_upload_calls(description, reviewers):
calls = [
((['git', 'config', 'gerrit.host'],), 'gerrit.example.com'),
- ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..'],),
+ ((['git', 'log', '--pretty=format:%s\n\n%b',
+ 'fake_ancestor_sha..HEAD'],),
description)
]
if git_cl.CHANGE_ID not in description:
calls += [
- ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..'],),
+ ((['git', 'log', '--pretty=format:%s\n\n%b',
+ 'fake_ancestor_sha..HEAD'],),
description),
((['git', 'commit', '--amend', '-m', description],),
''),
- ((['git', 'log', '--pretty=format:%s\n\n%b', 'fake_ancestor_sha..'],),
+ ((['git', 'log', '--pretty=format:%s\n\n%b',
+ 'fake_ancestor_sha..HEAD'],),
description)
]
calls += [
« no previous file with comments | « git_cl.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698