From f029dcf461d36f45f36ea59fe4eaf1aa00f614bb Mon Sep 17 00:00:00 2001 From: "maruel@chromium.org" Date: Tue, 12 Jun 2012 17:22:57 +0000 Subject: [PATCH] Update upload.py to chromium@53dd8c978c1b TBR=cmp@chromium.org BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10543116 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@141676 0039d316-1c4b-4281-b951-d872f2087c98 --- third_party/upload.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/third_party/upload.py b/third_party/upload.py index 538d3aef3..11849fd67 100755 --- a/third_party/upload.py +++ b/third_party/upload.py @@ -1302,12 +1302,16 @@ class GitVCS(VersionControlSystem): # then the diff of everything except deleted files with rename and copy # support enabled. cmd = [ - "git", "diff", "--no-color", "--no-ext-diff", "--full-index", "--ignore-submodules" + "git", "diff", "--no-color", "--no-ext-diff", "--full-index", + "--ignore-submodules", ] - diff = RunShell(cmd + ["--diff-filter=D"] + extra_args, env=env, - silent_ok=True) - diff += RunShell(cmd + ["-C", "--diff-filter=ACMRT"] + extra_args, env=env, - silent_ok=True) + diff = RunShell( + cmd + ["--diff-filter=D"] + extra_args, env=env, silent_ok=True) + diff += RunShell( + cmd + ["--find-copies-harder", "--diff-filter=ACMRT"] + extra_args, + env=env, silent_ok=True) + # The CL could be only file deletion or not. So accept silent diff for both + # commands then check for an empty diff manually. if not diff: ErrorExit("No output from %s" % (cmd + extra_args)) return diff