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

Unified Diff: trychange.py

Issue 5680006: Add support for an --upstream_branch argument to make diffing against... (Closed) Base URL: svn://chrome-svn/chrome/trunk/tools/depot_tools/
Patch Set: Created 10 years 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: trychange.py
===================================================================
--- trychange.py (revision 68803)
+++ trychange.py (working copy)
@@ -574,6 +574,9 @@
group.add_option("-E", "--exclude", action="append",
default=['ChangeLog'], metavar='REGEXP',
help="Regexp patterns to exclude files. Default: %default")
+ group.add_option("--upstream_branch", action="store",
+ help="specify the upstream branch to diff against in the "
+ "main checkout")
M-A Ruel 2010/12/15 20:01:21 can you align with the = ?
parser.add_option_group(group)
group = optparse.OptionGroup(parser, "Access the try server by HTTP")
@@ -651,7 +654,10 @@
try:
# Always include os.getcwd() in the checkout settings.
checkouts = []
- checkouts.append(GuessVCS(options, os.getcwd()))
+ path = os.getcwd()
+ if options.upstream_branch:
+ path += '@' + options.upstream_branch
+ checkouts.append(GuessVCS(options, path))
checkouts[0].AutomagicalSettings()
for item in options.sub_rep:
checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root,
« 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