Mercurial > hgrepos > Python > apps > py-cutils
diff cutils/treesum.py @ 278:822cf3a1da22
treesum: FIX: Removal of backslashes in output: do this only where really needed.
Otherwise "backslashreplace" error encodings are "corrected" too.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 21 Feb 2025 17:27:59 +0100 |
| parents | 9676ecd32a07 |
| children | 3c3f8151f36a |
line wrap: on
line diff
--- a/cutils/treesum.py Fri Feb 21 16:51:03 2025 +0100 +++ b/cutils/treesum.py Fri Feb 21 17:27:59 2025 +0100 @@ -551,7 +551,8 @@ (walk.WalkDirEntry.alt_u8(self._minimal) if self._minimal else b"")) else: - self._writer.write_root(walk.WalkDirEntry.alt_u8(root)) + self._writer.write_root(walk.WalkDirEntry.alt_u8( + util.normalize_filename(root, True))) self._writer.flush() if not self._follow_symlinks.command_line and os.path.islink(root): @@ -1164,8 +1165,6 @@ digest = (base64.b64encode(digest) if use_base64 else binascii.hexlify(digest)) - if filename != b"./@/": - filename = util.normalize_filename(filename, True) self.write(util.b(algorithm)) self.write(b" (") self.write(filename)
