diff hgext/narrow/narrowwirepeer.py @ 49244:cd51d4957b28

branching: merge stable into default
author Raphaël Gomès <rgomes@octobus.net>
date Thu, 02 Jun 2022 16:24:06 +0200
parents 6000f5b25c9b 6b10151b9621
children 584fc92dd8d7
line wrap: on
line diff
--- a/hgext/narrow/narrowwirepeer.py	Fri May 27 02:54:20 2022 +0200
+++ b/hgext/narrow/narrowwirepeer.py	Thu Jun 02 16:24:06 2022 +0200
@@ -9,6 +9,7 @@
 from mercurial import (
     bundle2,
     error,
+    exchange,
     extensions,
     hg,
     narrowspec,
@@ -85,6 +86,11 @@
         newincludes = splitpaths(newincludes)
         oldexcludes = splitpaths(oldexcludes)
         newexcludes = splitpaths(newexcludes)
+
+        # enforce narrow acl if set
+        if repo.ui.has_section(exchange._NARROWACL_SECTION):
+            exchange.applynarrowacl(repo, {'includepats': newincludes})
+
         # validate the patterns
         narrowspec.validatepatterns(set(oldincludes))
         narrowspec.validatepatterns(set(newincludes))