From 53bcf15733b029645689855bcd35224aa5acefcc Mon Sep 17 00:00:00 2001 From: "chase@chromium.org" Date: Fri, 13 Nov 2009 21:04:10 +0000 Subject: [PATCH] Make gcl change in a read-only checkout a warning. BUG=25824 TEST=gcl change in a read-only checkout is now a warning instead of a hard error Review URL: http://codereview.chromium.org/384128 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@31942 0039d316-1c4b-4281-b951-d872f2087c98 --- gcl.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gcl.py b/gcl.py index c8a1be75d1..16afdd7c42 100755 --- a/gcl.py +++ b/gcl.py @@ -1000,10 +1000,6 @@ def Change(change_info, args): 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")): - 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] @@ -1093,8 +1089,11 @@ def Change(change_info, args): ErrorExit("Empty changelist not saved") change_info._files = new_cl_files - change_info.Save() + if svn_info.get('URL', '').startswith('http:'): + Warn("WARNING: Creating CL in a read-only checkout. You will not be " + "able to commit it!") + print change_info.name + " changelist saved." if change_info.MissingTests(): Warn("WARNING: " + MISSING_TEST_MSG)