Patchwork [1,of,2] localrepo: specify optional callback parameter to pathauditor as a keyword

login
register
mail settings
Submitter Augie Fackler
Date Nov. 20, 2017, 11:21 p.m.
Message ID <263c05286affa42590c2.1511220076@augie-macbookpro2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/25682/
State Accepted
Headers show

Comments

Augie Fackler - Nov. 20, 2017, 11:21 p.m.
# HG changeset patch
# User Augie Fackler <augie@google.com>
# Date 1509743249 14400
#      Fri Nov 03 17:07:29 2017 -0400
# Node ID 263c05286affa42590c28403bb882564b844b8cf
# Parent  f6f8b7c8919a5aa1f711e3463f7dd9afa6b734c5
localrepo: specify optional callback parameter to pathauditor as a keyword
Gregory Szorc - Nov. 21, 2017, 3:42 a.m.
On Mon, Nov 20, 2017 at 3:21 PM, Augie Fackler <raf@durin42.com> wrote:

> # HG changeset patch
> # User Augie Fackler <augie@google.com>
> # Date 1509743249 14400
> #      Fri Nov 03 17:07:29 2017 -0400
> # Node ID 263c05286affa42590c28403bb882564b844b8cf
> # Parent  f6f8b7c8919a5aa1f711e3463f7dd9afa6b734c5
> localrepo: specify optional callback parameter to pathauditor as a keyword
>

Queued, thanks.


>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -366,9 +366,10 @@ class localrepository(object):
>          self.origroot = path
>          # These auditor are not used by the vfs,
>          # only used when writing this comment: basectx.match
> -        self.auditor = pathutil.pathauditor(self.root, self._checknested)
> -        self.nofsauditor = pathutil.pathauditor(self.root,
> self._checknested,
> -                                                realfs=False, cached=True)
> +        self.auditor = pathutil.pathauditor(
> +            self.root, callback=self._checknested)
> +        self.nofsauditor = pathutil.pathauditor(
> +            self.root, callback=self._checknested, realfs=False,
> cached=True)
>          self.baseui = baseui
>          self.ui = baseui.copy()
>          self.ui.copy = baseui.copy # prevent copying repo configuration
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -366,9 +366,10 @@  class localrepository(object):
         self.origroot = path
         # These auditor are not used by the vfs,
         # only used when writing this comment: basectx.match
-        self.auditor = pathutil.pathauditor(self.root, self._checknested)
-        self.nofsauditor = pathutil.pathauditor(self.root, self._checknested,
-                                                realfs=False, cached=True)
+        self.auditor = pathutil.pathauditor(
+            self.root, callback=self._checknested)
+        self.nofsauditor = pathutil.pathauditor(
+            self.root, callback=self._checknested, realfs=False, cached=True)
         self.baseui = baseui
         self.ui = baseui.copy()
         self.ui.copy = baseui.copy # prevent copying repo configuration