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

Unified Diff: third_party/upload.py

Issue 11032023: Update upload.py at 6edc5bf0ceb2. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 8 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/upload.py
diff --git a/third_party/upload.py b/third_party/upload.py
index 81fbf4114354d8939595d9fb238c79e55617b9da..ad819c2ab5d811fc7213ad31b0a10728cd9e6ddc 100755
--- a/third_party/upload.py
+++ b/third_party/upload.py
@@ -586,6 +586,12 @@ group.add_option("--vcs", action="store", dest="vcs",
group.add_option("--emulate_svn_auto_props", action="store_true",
dest="emulate_svn_auto_props", default=False,
help=("Emulate Subversion's auto properties feature."))
+# Git-specific
+group = parser.add_option_group("Git-specific options")
+group.add_option("--git_similarity", action="store", dest="git_similarity",
+ metavar="SIM", type="int", default=50,
+ help=("Set the minimum similarity index for detecting renames "
+ "and copies. See `git diff -C`. (default 50)."))
# Perforce-specific
group = parser.add_option_group("Perforce-specific options "
"(overrides P4 environment variables)")
@@ -1329,8 +1335,8 @@ class GitVCS(VersionControlSystem):
cmd + ["--no-renames", "--diff-filter=D"] + extra_args,
env=env, silent_ok=True)
diff += RunShell(
- cmd + ["--find-copies-harder", "-l100000", "--diff-filter=AMCRT"]
- + extra_args,
+ cmd + ["--find-copies-harder", "-l100000", "--diff-filter=AMCRT",
+ "-C%s" % self.options.git_similarity ] + extra_args,
env=env, silent_ok=True)
# The CL could be only file deletion or not. So accept silent diff for both
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698