summaryrefslogtreecommitdiffstats
path: root/subcmds/init.py
diff options
context:
space:
mode:
authorShawn O. Pearce <sop@google.com>2009-03-17 08:06:18 -0700
committerShawn O. Pearce <sop@google.com>2009-03-17 08:11:51 -0700
commit1fc99f4e472c86915cb1affd5507140277711227 (patch)
treef369f77f27b2ef5bc599fad3e801906b7419180d /subcmds/init.py
parent1775dbe176fe284a9baa8697f600f03e9b8dabbc (diff)
downloadgit-repo-1fc99f4e472c86915cb1affd5507140277711227.tar.gz
Give a more friendly error in 'repo init' if manifest url is invalid
Instead of a stack trace ending in origin/master not existing we now tell the user the manifest url is invalid if 'git fetch' has failed out early. Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'subcmds/init.py')
-rw-r--r--subcmds/init.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/subcmds/init.py b/subcmds/init.py
index 937296bb..04de48a7 100644
--- a/subcmds/init.py
+++ b/subcmds/init.py
@@ -124,7 +124,11 @@ default.xml will be used.
124 print >>sys.stderr, 'fatal: --mirror not supported on existing client' 124 print >>sys.stderr, 'fatal: --mirror not supported on existing client'
125 sys.exit(1) 125 sys.exit(1)
126 126
127 m.Sync_NetworkHalf() 127 if not m.Sync_NetworkHalf():
128 r = m.GetRemote(m.remote.name)
129 print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url
130 sys.exit(1)
131
128 m.Sync_LocalHalf() 132 m.Sync_LocalHalf()
129 if is_new: 133 if is_new:
130 m.StartBranch('default') 134 m.StartBranch('default')