Patchwork [1,of,2] exchange: remove check for 'format' key

login
register
mail settings
Submitter Martin von Zweigbergk
Date April 7, 2015, 4 p.m.
Message ID <7b78fb866c1fb337bb1d.1428422441@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8536/
State Accepted
Commit 13a19717ade603d8ef384ecc1a9d26500c796900
Headers show

Comments

Martin von Zweigbergk - April 7, 2015, 4 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1428420611 25200
#      Tue Apr 07 08:30:11 2015 -0700
# Node ID 7b78fb866c1fb337bb1d740853edc508a932d6b8
# Parent  b2fb1403994e033584aed8a487ab162a9d75fa80
exchange: remove check for 'format' key

When the 'kwargs' variable was added in 12f161f08d74 (bundle2: allow
pulling changegroups using bundle2, 2014-04-01), it could contain only
'bundlecaps', 'common' and 'heads', so the check for 'format' would
always be false. Since then, _pullbundle2extraprepare() has been added
for hooks, but it seems unlikely that they would a 'format' key.

Patch

diff -r b2fb1403994e -r 7b78fb866c1f mercurial/exchange.py
--- a/mercurial/exchange.py	Mon Apr 06 17:16:55 2015 -0500
+++ b/mercurial/exchange.py	Tue Apr 07 08:30:11 2015 -0700
@@ -984,8 +984,6 @@ 
             kwargs['obsmarkers'] = True
             pullop.stepsdone.add('obsmarkers')
     _pullbundle2extraprepare(pullop, kwargs)
-    if kwargs.keys() == ['format']:
-        return # nothing to pull
     bundle = pullop.remote.getbundle('pull', **kwargs)
     try:
         op = bundle2.processbundle(pullop.repo, bundle, pullop.gettransaction)