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

Unified Diff: gcl.py

Issue 378027: Error when creating a CL in a read-only checkout.... (Closed) Base URL: svn://svn.chromium.org/chrome/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 30995)
+++ gcl.py (working copy)
@@ -994,6 +994,17 @@
def Change(change_info, args):
"""Creates/edits a changelist."""
silent = FilterFlag(args, "--silent")
+
+ # Verify the user is running the change command from a read-write checkout.
+ svn_info = gclient_scm.CaptureSVNInfo('.')
+ if not svn_info:
+ ErrorExit("Current checkout is unversioned. Please retry with a versioned "
+ "directory.")
+ if (svn_info.get('URL', '').startswith('http:') and
+ not FilterFlag(args, "--force")):
M-A Ruel 2009/11/09 18:51:41 alignment
+ ErrorExit("This is a read-only checkout. Retry in a read-write checkout "
+ "or use --force to override.")
+
if (len(args) == 1):
filename = args[0]
f = open(filename, 'rU')
« 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