summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--subcmds/sync.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/subcmds/sync.py b/subcmds/sync.py
index d3f6adc1..01e2eba6 100644
--- a/subcmds/sync.py
+++ b/subcmds/sync.py
@@ -47,6 +47,9 @@ the manifest.
47""" 47"""
48 48
49 def _Options(self, p): 49 def _Options(self, p):
50 p.add_option('-n','--network-only',
51 dest='network_only', action='store_true',
52 help="fetch only, don't update working tree")
50 p.add_option('--no-repo-verify', 53 p.add_option('--no-repo-verify',
51 dest='no_repo_verify', action='store_true', 54 dest='no_repo_verify', action='store_true',
52 help='do not verify repo source code') 55 help='do not verify repo source code')
@@ -90,6 +93,10 @@ the manifest.
90 else: 93 else:
91 print >>sys.stderr, 'warning: Skipped upgrade to unverified version' 94 print >>sys.stderr, 'warning: Skipped upgrade to unverified version'
92 95
96 if opt.network_only:
97 # bail out now; the rest touches the working tree
98 return
99
93 if mp.HasChanges: 100 if mp.HasChanges:
94 if not mp.Sync_LocalHalf(): 101 if not mp.Sync_LocalHalf():
95 sys.exit(1) 102 sys.exit(1)