diff mercurial/wireproto.py @ 20969:7a679918ee2b

localrepo: add unbundle support Localrepo now supports the unbundle method of pushing changegroups. We plan to use the unbundle call for bundle2 so it is important that all peers supports it. The `peer.unbundle` and `peer.addchangegroup` code path have small difference so cause some test output changes. None of those changes seems problematic.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 04 Apr 2014 17:50:44 -0700
parents 33d5fdd9bd99
children 7731a2281cf0
line wrap: on
line diff
--- a/mercurial/wireproto.py	Fri Apr 04 17:28:59 2014 -0700
+++ b/mercurial/wireproto.py	Fri Apr 04 17:50:44 2014 -0700
@@ -774,5 +774,12 @@
         finally:
             fp.close()
             os.unlink(tempname)
+    except util.Abort, inst:
+        # The old code we moved used sys.stderr directly.
+        # We did not changed it to minise code change.
+        # This need to be moved to something proper.
+        # Feel free to do it.
+        sys.stderr.write("abort: %s\n" % inst)
+        return pushres(0)
     except exchange.PushRaced, exc:
         return pusherr(str(exc))