Commit db9b0e3a authored by cmp@chromium.org's avatar cmp@chromium.org

Revert "Turn on git diff copy detection for git-cl upload."

This reverts commit db5a0def.

TBR=maruel@chromium.org


Review URL: https://chromiumcodereview.appspot.com/10532034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140808 0039d316-1c4b-4281-b951-d872f2087c98
parent d4af662b
...@@ -1019,10 +1019,7 @@ def RietveldUpload(options, args, cl): ...@@ -1019,10 +1019,7 @@ def RietveldUpload(options, args, cl):
upload_args.extend(['--base_url', remote_url]) upload_args.extend(['--base_url', remote_url])
try: try:
# upload uses '-C' by default when generating the diff for upload. issue, patchset = upload.RealMain(['upload'] + upload_args + args)
# Add another '-C' to trigger --find-copies-harder.
issue, patchset = upload.RealMain(['upload'] + upload_args + args +
['--', '-C'])
except KeyboardInterrupt: except KeyboardInterrupt:
sys.exit(1) sys.exit(1)
except: except:
...@@ -1115,7 +1112,7 @@ def CMDupload(parser, args): ...@@ -1115,7 +1112,7 @@ def CMDupload(parser, args):
if 'GIT_EXTERNAL_DIFF' in env: if 'GIT_EXTERNAL_DIFF' in env:
del env['GIT_EXTERNAL_DIFF'] del env['GIT_EXTERNAL_DIFF']
subprocess2.call( subprocess2.call(
['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C'] + args, env=env) ['git', 'diff', '--no-ext-diff', '--stat', '-M'] + args, env=env)
if settings.GetIsGerrit(): if settings.GetIsGerrit():
return GerritUpload(options, args, cl) return GerritUpload(options, args, cl)
......
...@@ -114,7 +114,7 @@ class TestGitCl(TestCase): ...@@ -114,7 +114,7 @@ class TestGitCl(TestCase):
((['git', 'config', 'branch.master.rietveldpatchset'],), ''), ((['git', 'config', 'branch.master.rietveldpatchset'],), ''),
((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'), ((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'),
((['git', 'config', 'user.email'],), 'me@example.com'), ((['git', 'config', 'user.email'],), 'me@example.com'),
((['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C', 'master...'],), ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],),
'+dat'), '+dat'),
((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'), ((['git', 'log', '--pretty=format:%s\n\n%b', 'master..'],), 'desc\n'),
] ]
...@@ -217,7 +217,7 @@ class TestGitCl(TestCase): ...@@ -217,7 +217,7 @@ class TestGitCl(TestCase):
'--message', description '--message', description
] + args + [ ] + args + [
'--cc', 'joe@example.com', '--cc', 'joe@example.com',
'master...', '--', '-C', 'master...'
] ]
def _run_reviewer_test( def _run_reviewer_test(
...@@ -347,7 +347,7 @@ class TestGitCl(TestCase): ...@@ -347,7 +347,7 @@ class TestGitCl(TestCase):
((['git', 'config', 'branch.master.rietveldpatchset'],), ''), ((['git', 'config', 'branch.master.rietveldpatchset'],), ''),
((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'), ((['git', 'log', '--pretty=format:%s%n%n%b', 'master...'],), 'foo'),
((['git', 'config', 'user.email'],), 'me@example.com'), ((['git', 'config', 'user.email'],), 'me@example.com'),
((['git', 'diff', '--no-ext-diff', '--stat', '-C', '-C', 'master...'],), ((['git', 'diff', '--no-ext-diff', '--stat', '-M', 'master...'],),
'+dat'), '+dat'),
] ]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment