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

login
register
mail settings
Submitter Pierre-Yves David
Date April 22, 2014, 8:10 p.m.
Message ID <4c01060d31545244d980.1398197450@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/4425/
State Accepted
Commit a92619a2dbd70ef0cd9b95b37b8ffa1a7fcd5d03
Headers show

Comments

Pierre-Yves David - April 22, 2014, 8:10 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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):