idlsoft created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/narrow/narrowbundle2.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowbundle2.py b/hgext/narrow/narrowbundle2.py
--- a/hgext/narrow/narrowbundle2.py
+++ b/hgext/narrow/narrowbundle2.py
@@ -327,13 +327,14 @@
             part.addparam('treemanifest', '1')
 
 def applyacl_narrow(repo, kwargs):
-    username = repo.ui.shortuser(repo.ui.username())
-    user_includes = repo.ui.configlist(
+    ui = repo.ui
+    username = ui.shortuser(ui.environ.get('REMOTE_USER') or ui.username())
+    user_includes = ui.configlist(
         _NARROWACL_SECTION, username + '.includes',
-        repo.ui.configlist(_NARROWACL_SECTION, 'default.includes'))
-    user_excludes = repo.ui.configlist(
+        ui.configlist(_NARROWACL_SECTION, 'default.includes'))
+    user_excludes = ui.configlist(
         _NARROWACL_SECTION, username + '.excludes',
-        repo.ui.configlist(_NARROWACL_SECTION, 'default.excludes'))
+        ui.configlist(_NARROWACL_SECTION, 'default.excludes'))
     if not user_includes:
         raise error.Abort(_("{} configuration for user {} is empty")
                           .format(_NARROWACL_SECTION, username))



To: idlsoft, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to