match: correct doc for _rootsdirsandparents after 5a7df82de142
authorKyle Lippincott <spectral@google.com>
Wed, 08 Aug 2018 16:53:17 -0700
changeset 47466 f356be1a7ba3aff49d473eca52eadd59f3d3f778
parent 47450 a3cabe9415e161f701aeeed978e387747f5abcc8
child 47467 b9f94d67ea732831cedc60de95698a0e6e5b1d06
push id848
push usergszorc@mozilla.com
push dateThu, 09 Aug 2018 18:54:45 +0000
match: correct doc for _rootsdirsandparents after 5a7df82de142 Differential Revision: https://phab.mercurial-scm.org/D4159
mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -1188,20 +1188,21 @@ def _patternrootsanddirs(kindpats):
 def _roots(kindpats):
     '''Returns root directories to match recursively from the given patterns.'''
     roots, dirs = _patternrootsanddirs(kindpats)
     return roots
 
 def _rootsdirsandparents(kindpats):
     '''Returns roots and exact directories from patterns.
 
-    roots are directories to match recursively, whereas exact directories should
-    be matched non-recursively. The returned (roots, dirs) tuple will also
-    include directories that need to be implicitly considered as either, such as
-    parent directories.
+    `roots` are directories to match recursively, `dirs` should
+    be matched non-recursively, and `parents` are the implicitly required
+    directories to walk to items in either roots or dirs.
+
+    Returns a tuple of (roots, dirs, parents).
 
     >>> _rootsdirsandparents(
     ...     [(b'glob', b'g/h/*', b''), (b'glob', b'g/h', b''),
     ...      (b'glob', b'g*', b'')])
     (['g/h', 'g/h', '.'], [], ['g', '.'])
     >>> _rootsdirsandparents(
     ...     [(b'rootfilesin', b'g/h', b''), (b'rootfilesin', b'', b'')])
     ([], ['g/h', '.'], ['g', '.'])