Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/util/walk.py @ 155:bf74ce3c968d
When computing digests use the order imposed by names alone.
No different loops for dirs and nondirs.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 06 Jan 2025 13:39:12 +0100 |
| parents | c7df81fb84b7 |
| children | 481cc9b26861 |
comparison
equal
deleted
inserted
replaced
| 154:c7df81fb84b7 | 155:bf74ce3c968d |
|---|---|
| 128 - optimized for use in :command:`treesum` | 128 - optimized for use in :command:`treesum` |
| 129 - most errors are not suppressed | 129 - most errors are not suppressed |
| 130 - the `root` is never part of the returned data | 130 - the `root` is never part of the returned data |
| 131 - the returned directory in "top" is not a string form but a list of | 131 - the returned directory in "top" is not a string form but a list of |
| 132 individual path segments | 132 individual path segments |
| 133 - there is only one yields list | 133 - there is only one yielded list |
| 134 | 134 |
| 135 * contains :class:`WalkDirEntry` | 135 * contains :class:`WalkDirEntry` |
| 136 * sorted by its fsname | 136 * sorted by its fsname |
| 137 | |
| 138 The caller can easily get the old dirs and nondirs by filtering | |
| 139 the yielded list using "entry.is_dir". | |
| 137 | 140 |
| 138 - recurse into sub-directories first ("topdown=False") | 141 - recurse into sub-directories first ("topdown=False") |
| 139 - sort consistently all yielded lists by the filesystem encoding | 142 - sort consistently all yielded lists by the filesystem encoding |
| 140 | 143 |
| 141 .. note:: The implementation is based on Python 3.11 and needs a | 144 .. note:: The implementation is based on Python 3.11 and needs a |
