Patchwork D6839: idirstate: group private methods and attrs that are in the interface

login
register
mail settings
Submitter phabricator
Date Sept. 14, 2019, 3:34 p.m.
Message ID <3449eaf21f7146343cb8e232431cec5a@localhost.localdomain>
Download mbox | patch
Permalink /patch/41665/
State Not Applicable
Headers show

Comments

phabricator - Sept. 14, 2019, 3:34 p.m.
Closed by commit rHG97b79354e9f0: idirstate: group private methods and attrs that are in the interface (authored by durin42).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6839?vs=16507&id=16539

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6839/new/

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

AFFECTED FILES
  mercurial/interfaces/dirstate.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/interfaces/dirstate.py b/mercurial/interfaces/dirstate.py
--- a/mercurial/interfaces/dirstate.py
+++ b/mercurial/interfaces/dirstate.py
@@ -20,6 +20,19 @@ 
         the dirstate.
         '''
 
+    # TODO: all these private methods and attributes should be made
+    # public or removed from the interface.
+    _ignore = interfaceutil.Attribute('Matcher for ignored files.')
+
+    def _ignorefiles():
+        """Return a list of files containing patterns to ignore."""
+
+    def _ignorefileandline(f):
+        "Given a file `f`, return the ignore file and line that ignores it."
+
+    _checklink = interfaceutil.Attribute('Callable for checking symlinks.')
+    _checkexec = interfaceutil.Attribute('Callable for checking exec bits.')
+
     @contextlib.contextmanager
     def parentchange():
         '''Context manager for handling dirstate parents.
@@ -37,11 +50,6 @@ 
     def hasdir(d):
         pass
 
-    _ignore = interfaceutil.Attribute('Matcher for ignored files.')
-
-    _checklink = interfaceutil.Attribute('Callable for checking symlinks.')
-    _checkexec = interfaceutil.Attribute('Callable for checking exec bits.')
-
     def flagfunc(buildfallback):
         pass
 
@@ -196,16 +204,6 @@ 
         with a newer callback.
         """
 
-    def _ignorefiles():
-        """Return a list of files containing patterns to ignore.
-
-        TODO this should not be exposed."""
-
-    def _ignorefileandline(f):
-        """Given a file `f`, return the ignore file and line that ignores it.
-
-        TODO this should not be exposed."""
-
     def walk(match, subrepos, unknown, ignored, full=True):
         '''
         Walk recursively through the directory tree, finding all files