Commit df3302b3 authored by maruel@chromium.org's avatar maruel@chromium.org

Update upload.py to r690 and include fix for "support for git mv in rietveld"

I just don't want to wait for http://codereview.appspot.com/4333051 to be committed.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6728033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80045 0039d316-1c4b-4281-b951-d872f2087c98
parent d57771d0
......@@ -1214,8 +1214,19 @@ class GitVCS(VersionControlSystem):
# git config key "diff.external" is used).
env = os.environ.copy()
if 'GIT_EXTERNAL_DIFF' in env: del env['GIT_EXTERNAL_DIFF']
return RunShell(["git", "diff", "--no-ext-diff", "--full-index", "-M"]
+ extra_args, env=env)
# -M/-C will not print the diff for the deleted file when a file is renamed.
# This is confusing because the original file will not be shown on the
# review when a file is renamed. So first get the diff of all deleted files,
# then the diff of everything except deleted files with rename and copy
# support enabled.
cmd = ["git", "diff", "--no-ext-diff", "--full-index"]
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)
if not diff:
ErrorExit("No output from %s" % (cmd + extra_args))
return diff
def GetUnknownFiles(self):
status = RunShell(["git", "ls-files", "--exclude-standard", "--others"],
......@@ -1871,7 +1882,7 @@ def GuessVCSName(options):
if returncode == 0:
return (VCS_CVS, None)
except OSError, (errno, message):
if error != 2:
if errno != 2:
raise
return (VCS_UNKNOWN, None)
......
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