Patchwork D6434: narrow: remove unrequired compat code for old versions of hg

login
register
mail settings
Submitter phabricator
Date May 24, 2019, 5:34 a.m.
Message ID <9f713dee2d818698e48a8f0ff097db8a@localhost.localdomain>
Download mbox | patch
Permalink /patch/40221/
State Not Applicable
Headers show

Comments

phabricator - May 24, 2019, 5:34 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG92f584065b4f: narrow: remove unrequired compat code for old versions of hg (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6434?vs=15236&id=15248

REVISION DETAIL
  https://phab.mercurial-scm.org/D6434

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS




To: pulkit, durin42, martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -51,15 +51,11 @@ 
     assert repo.ui.configbool('experimental', 'narrowservebrokenellipses')
 
     cgversions = b2caps.get('changegroup')
-    if cgversions:  # 3.1 and 3.2 ship with an empty value
-        cgversions = [v for v in cgversions
-                      if v in changegroup.supportedoutgoingversions(repo)]
-        if not cgversions:
-            raise ValueError(_('no common changegroup version'))
-        version = max(cgversions)
-    else:
-        raise ValueError(_("server does not advertise changegroup version,"
-                           " can't negotiate support for ellipsis nodes"))
+    cgversions = [v for v in cgversions
+                  if v in changegroup.supportedoutgoingversions(repo)]
+    if not cgversions:
+        raise ValueError(_('no common changegroup version'))
+    version = max(cgversions)
 
     include = sorted(filter(bool, kwargs.get(r'includepats', [])))
     exclude = sorted(filter(bool, kwargs.get(r'excludepats', [])))