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

Unified Diff: gcl.py

Issue 387001: Make 'gcl change --force' generate random changename in read-only checkout.... (Closed) Base URL: http://src.chromium.org/svn/trunk/tools/depot_tools/
Patch Set: '' Created 11 years, 1 month 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: gcl.py
===================================================================
--- gcl.py (revision 31548)
+++ gcl.py (working copy)
@@ -1239,12 +1239,19 @@
DeleteEmptyChangeLists()
return 0
- if len(argv) == 2:
- if command == "change":
+ if command == "change":
+ if len(argv) == 2:
# Generate a random changelist name.
changename = GenerateChangeName()
+ elif argv[2] == '--force':
+ changename = GenerateChangeName()
+ # argv[3:] is passed to Change() as |args| later. Change() should receive
+ # |args| which includes '--force'.
+ argv.insert(2, changename)
else:
- ErrorExit("Need a changelist name.")
+ changename = argv[2]
+ elif len(argv) == 2:
+ ErrorExit("Need a changelist name.")
else:
changename = argv[2]
« 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