narrow: rename getbundlechangegrouppart_nonellipsis function
authorPulkit Goyal <pulkit@yandex-team.ru>
Thu, 30 Aug 2018 13:11:15 +0300
changeset 39391 3433e8f39905
parent 39390 048333ef0169
child 39392 659e2bbd0c20
narrow: rename getbundlechangegrouppart_nonellipsis function The function is renamed to getbundlechangegrouppart_widen as per suggestion in D4383. The motivation is such that we can evolve the function into a handler for new wire-protocol command. Differential Revision: https://phab.mercurial-scm.org/D4424
hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py	Thu Aug 30 13:05:59 2018 +0300
+++ b/hgext/narrow/narrowbundle2.py	Thu Aug 30 13:11:15 2018 +0300
@@ -50,9 +50,9 @@
     caps[NARROWCAP] = ['v0']
     return caps
 
-def getbundlechangegrouppart_nonellipsis(bundler, repo, source, bundlecaps=None,
-                                         b2caps=None, heads=None, common=None,
-                                         **kwargs):
+def getbundlechangegrouppart_widen(bundler, repo, source, bundlecaps=None,
+                                   b2caps=None, heads=None, common=None,
+                                   **kwargs):
     """Handling changegroup changegroup generation on the server when user
     is widening their narrowspec"""
 
@@ -317,7 +317,7 @@
             repo.ui.configbool('experimental', 'narrowservebrokenellipses')):
             getbundlechangegrouppart_narrow(*args, **kwargs)
         elif kwargs.get(r'widen', False) and kwargs.get(r'narrow', False):
-            getbundlechangegrouppart_nonellipsis(*args, **kwargs)
+            getbundlechangegrouppart_widen(*args, **kwargs)
         else:
             origcgfn(*args, **kwargs)
     exchange.getbundle2partsmapping['changegroup'] = wrappedcgfn