# HG changeset patch # User Augie Fackler # Date 1568123853 14400 # Node ID 97b79354e9f08609b25ce587e26e612042ed7f1f # Parent bbd154627a72bbb88b8c000f0b61d1c192e7151d idirstate: group private methods and attrs that are in the interface This makes it a little more obvious at a glance what work is left. Fortunately there's not a whole lot left. I suspect the ignore logic is going to be the tricky bit. Differential Revision: https://phab.mercurial-scm.org/D6839 diff -r bbd154627a72 -r 97b79354e9f0 mercurial/interfaces/dirstate.py --- a/mercurial/interfaces/dirstate.py Tue Sep 10 09:42:56 2019 -0400 +++ b/mercurial/interfaces/dirstate.py Tue Sep 10 09:57:33 2019 -0400 @@ -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