changeset 32149:9a9d54ae9963

localrepo: reuse exchange.bundle2requested() It seems like localrepo.getbundle() is trying to do the same thing, so let's just call the method. That way we get the same condition as there (matching any "HG2" prefix, not only "HG20").
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 May 2017 10:33:26 -0700
parents 2cfdf5241096
children 282b288aa20c
files mercurial/localrepo.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Fri Apr 28 01:13:07 2017 +0530
+++ b/mercurial/localrepo.py	Wed May 03 10:33:26 2017 -0700
@@ -164,7 +164,7 @@
                                           **kwargs)
         cb = util.chunkbuffer(chunks)
 
-        if bundlecaps is not None and 'HG20' in bundlecaps:
+        if exchange.bundle2requested(bundlecaps):
             # When requesting a bundle2, getbundle returns a stream to make the
             # wire level function happier. We need to build a proper object
             # from it in local peer.