[PATCH 06 of 12 stable] bundle2: catch UnknownPartError during pull

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Tue Apr 22 15:10:50 CDT 2014


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1398134581 25200
#      Mon Apr 21 19:43:01 2014 -0700
# Branch stable
# Node ID 4c01060d31545244d980895ab9c29e9268e685be
# Parent  54099a51da15a76638242be65943054ffe48a663
bundle2: catch UnknownPartError during pull

We narrow the exception catching while pulling.

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -582,11 +582,11 @@ def _pullbundle2(pullop):
     if kwargs.keys() == ['format']:
         return # nothing to pull
     bundle = pullop.remote.getbundle('pull', **kwargs)
     try:
         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)
-    except KeyError, exc:
+    except UnknownPartError, exc:
         raise util.Abort('missing support for %s' % exc)
     assert len(op.records['changegroup']) == 1
     pullop.cgresult = op.records['changegroup'][0]['return']
 
 def _pullbundle2extraprepare(pullop, kwargs):


More information about the Mercurial-devel mailing list