diff --git a/subcmds/sync.py b/subcmds/sync.py index 4763fadc..21bc5e7d 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -354,6 +354,8 @@ later is required to fix a server side protocol bug. print('error: Cannot fetch %s from %s' % (project.name, project.remote.url), file=sys.stderr) + except GitError as e: + print('error.GitError: Cannot fetch %s' % str(e), file=sys.stderr) except Exception as e: print('error: Cannot fetch %s (%s: %s)' % (project.name, type(e).__name__, str(e)), file=sys.stderr) @@ -446,6 +448,9 @@ later is required to fix a server side protocol bug. try: project.Sync_LocalHalf(syncbuf, force_sync=force_sync) success = syncbuf.Finish() + except GitError as e: + print('error.GitError: Cannot checkout %s: %s' % + (project.name, str(e)), file=sys.stderr) except Exception as e: print('error: Cannot checkout %s: %s: %s' % (project.name, type(e).__name__, str(e)),