Patchwork D4013: exchange: make narrow ACL presence imply narrow=True

login
register
mail settings
Submitter phabricator
Date Aug. 2, 2018, 9:45 p.m.
Message ID <796e01c126a04c98fbda662baa985bb4@localhost.localdomain>
Download mbox | patch
Permalink /patch/33134/
State Not Applicable
Headers show

Comments

phabricator - Aug. 2, 2018, 9:45 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG98df52d5042c: exchange: make narrow ACL presence imply narrow=True (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4013?vs=9705&id=9809

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

AFFECTED FILES
  hgext/narrow/narrowbundle2.py
  mercurial/exchange.py

CHANGE DETAILS




To: indygreg, durin42, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -1872,9 +1872,11 @@ 
 
     new_args = {}
     new_args.update(kwargs)
-    new_args['includepats'] = req_includes
+    new_args[r'narrow'] = True
+    new_args[r'includepats'] = req_includes
     if req_excludes:
-        new_args['excludepats'] = req_excludes
+        new_args[r'excludepats'] = req_excludes
+
     return new_args
 
 def _computeellipsis(repo, common, heads, known, match, depth=None):
diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -309,9 +309,9 @@ 
     def wrappedcgfn(*args, **kwargs):
         repo = args[1]
         if repo.ui.has_section(_NARROWACL_SECTION):
-            getbundlechangegrouppart_narrow(
-                *args, **exchange.applynarrowacl(repo, kwargs))
-        elif kwargs.get(r'narrow', False):
+            kwargs = exchange.applynarrowacl(repo, kwargs)
+
+        if kwargs.get(r'narrow', False):
             getbundlechangegrouppart_narrow(*args, **kwargs)
         else:
             origcgfn(*args, **kwargs)