mercurial/pathutil.py
changeset 49907 7623d79f872c
parent 49906 15175774e1c5
child 49908 789e152a6bdb
equal deleted inserted replaced
49906:15175774e1c5 49907:7623d79f872c
   312         yield path[:pos]
   312         yield path[:pos]
   313         pos = path.rfind(b'/', 0, pos)
   313         pos = path.rfind(b'/', 0, pos)
   314     yield b''
   314     yield b''
   315 
   315 
   316 
   316 
       
   317 def finddirs_rev_noroot(path: bytes) -> Iterator[bytes]:
       
   318     pos = path.find(pycompat.ossep)
       
   319     while pos != -1:
       
   320         yield path[:pos]
       
   321         pos = path.find(pycompat.ossep, pos + 1)
       
   322 
       
   323 
   317 class dirs:
   324 class dirs:
   318     '''a multiset of directory names from a set of file paths'''
   325     '''a multiset of directory names from a set of file paths'''
   319 
   326 
   320     def __init__(self, map, only_tracked=False):
   327     def __init__(self, map, only_tracked=False):
   321         """
   328         """