diff mercurial/commands.py @ 1601:a1b25fb2e764

Error handling for unbundle, fix option line wrapping
author Matt Mackall <mpm@selenic.com>
date Tue, 27 Dec 2005 16:18:00 -0600
parents 728fd9584993
children fb4149eebdd4
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2112,7 +2112,9 @@ def unbundle(ui, repo, fname, **opts):
             yield zd.decompress(chunk)
 
     bzgen = bzgenerator(util.filechunkiter(f, 4096))
-    repo.addchangegroup(util.chunkbuffer(bzgen))
+    if repo.addchangegroup(util.chunkbuffer(bzgen)):
+        return 1
+
     if opts['update']:
         return update(ui, repo)
     else:
@@ -2410,7 +2412,8 @@ table = {
     "tip": (tip, [], _('hg tip')),
     "unbundle":
         (unbundle,
-         [('u', 'update', None, _('update the working directory to tip after unbundle'))],
+         [('u', 'update', None,
+           _('update the working directory to tip after unbundle'))],
          _('hg unbundle [-u] FILE')),
     "undo": (undo, [], _('hg undo')),
     "^update|up|checkout|co":