diff mercurial/exchange.py @ 21618:7568f5c1c801

bundle2: move exception classes into the error module Exceptions should have known their place.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 28 May 2014 15:31:05 -0700
parents 0cfda08afd24
children 75ff093d2763
line wrap: on
line diff
--- a/mercurial/exchange.py	Wed May 28 14:22:24 2014 -0700
+++ b/mercurial/exchange.py	Wed May 28 15:31:05 2014 -0700
@@ -224,11 +224,11 @@
     stream = util.chunkbuffer(bundler.getchunks())
     try:
         reply = pushop.remote.unbundle(stream, ['force'], 'push')
-    except bundle2.BundleValueError, exc:
+    except error.BundleValueError, exc:
         raise util.Abort('missing support for %s' % exc)
     try:
         op = bundle2.processbundle(pushop.repo, reply)
-    except bundle2.BundleValueError, exc:
+    except error.BundleValueError, exc:
         raise util.Abort('missing support for %s' % exc)
     cgreplies = op.records.getreplies(cgpart.id)
     assert len(cgreplies['changegroup']) == 1
@@ -554,7 +554,7 @@
     bundle = pullop.remote.getbundle('pull', **kwargs)
     try:
         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
-    except bundle2.BundleValueError, exc:
+    except error.BundleValueError, exc:
         raise util.Abort('missing support for %s' % exc)
 
     if pullop.fetch: