From 1fc99f4e472c86915cb1affd5507140277711227 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Tue, 17 Mar 2009 08:06:18 -0700 Subject: [PATCH] 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 --- subcmds/init.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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. print >>sys.stderr, 'fatal: --mirror not supported on existing client' sys.exit(1) - m.Sync_NetworkHalf() + if not m.Sync_NetworkHalf(): + r = m.GetRemote(m.remote.name) + print >>sys.stderr, 'fatal: cannot obtain manifest %s' % r.url + sys.exit(1) + m.Sync_LocalHalf() if is_new: m.StartBranch('default')