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

Unified Diff: gclient_scm.py

Issue 7918027: Add a --unmanaged flag to gclient config to allow the main solution to be unmanaged by the scm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools/
Patch Set: '' Created 9 years, 3 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 | « gclient.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gclient_scm.py
===================================================================
--- gclient_scm.py (revision 101995)
+++ gclient_scm.py (working copy)
@@ -174,9 +174,13 @@
url, deps_revision = gclient_utils.SplitUrlRevision(self.url)
rev_str = ""
revision = deps_revision
+ managed = True
if options.revision:
# Override the revision number.
revision = str(options.revision)
+ if revision == 'unmanaged':
+ revision = None
+ managed = False
if not revision:
revision = default_rev
@@ -218,6 +222,10 @@
print('')
return
+ if not managed:
+ print ('________ unmanaged solution; skipping %s' % self.relpath)
+ return
+
if not os.path.exists(os.path.join(self.checkout_path, '.git')):
raise gclient_utils.Error('\n____ %s%s\n'
'\tPath is not a git repo. No .git dir.\n'
@@ -735,14 +743,19 @@
url, revision = gclient_utils.SplitUrlRevision(self.url)
# Keep the original unpinned url for reference in case the repo is switched.
base_url = url
+ managed = True
if options.revision:
# Override the revision number.
revision = str(options.revision)
if revision:
- forced_revision = True
- # Reconstruct the url.
- url = '%s@%s' % (url, revision)
- rev_str = ' at %s' % revision
+ if revision != 'unmanaged':
+ forced_revision = True
+ # Reconstruct the url.
+ url = '%s@%s' % (url, revision)
+ rev_str = ' at %s' % revision
+ else:
+ managed = False
+ revision = None
else:
forced_revision = False
rev_str = ''
@@ -754,6 +767,10 @@
self._RunAndGetFileList(command, options, file_list, self._root_dir)
return
+ if not managed:
+ print ('________ unmanaged solution; skipping %s' % self.relpath)
+ return
+
# Get the existing scm url and the revision number of the current checkout.
try:
from_info = scm.SVN.CaptureInfo(os.path.join(self.checkout_path, '.'))
« no previous file with comments | « gclient.py ('k') | tests/gclient_scm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698