author | Arseniy Alekseyev <aalekseyev@janestreet.com> |
Fri, 06 Jan 2023 17:29:42 +0000 | |
changeset 49907 | 7623d79f872c |
parent 49906 | 15175774e1c5 |
child 49908 | 789e152a6bdb |
--- a/mercurial/pathutil.py Mon Jan 16 12:10:20 2023 +0000 +++ b/mercurial/pathutil.py Fri Jan 06 17:29:42 2023 +0000 @@ -314,6 +314,13 @@ yield b'' +def finddirs_rev_noroot(path: bytes) -> Iterator[bytes]: + pos = path.find(pycompat.ossep) + while pos != -1: + yield path[:pos] + pos = path.find(pycompat.ossep, pos + 1) + + class dirs: '''a multiset of directory names from a set of file paths'''