Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 326:a464f36fffcb
treesum: Rename the current TreesumWriter to TaggedTreesumWriter.
This is in preparation for a coming TabularTreesumWriter.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 26 Mar 2025 23:06:05 +0100 |
| parents | cd458e318553 |
| children | 8e62738e7469 |
comparison
equal
deleted
inserted
replaced
| 325:cd458e318553 | 326:a464f36fffcb |
|---|---|
| 515 | 515 |
| 516 fnmatcher = fnmatch.FnMatcher.build_from_commandline_patterns( | 516 fnmatcher = fnmatch.FnMatcher.build_from_commandline_patterns( |
| 517 opts.fnmatch_filters) | 517 opts.fnmatch_filters) |
| 518 | 518 |
| 519 with out_cm as outfp: | 519 with out_cm as outfp: |
| 520 writer = TreesumWriter(outfp) | 520 writer = TaggedTreesumWriter(outfp) |
| 521 for d in opts.directories: | 521 for d in opts.directories: |
| 522 V1DirectoryTreesumGenerator( | 522 V1DirectoryTreesumGenerator( |
| 523 opts.algorithm, opts.mmap, opts.base64, | 523 opts.algorithm, opts.mmap, opts.base64, |
| 524 opts.follow_symlinks, | 524 opts.follow_symlinks, |
| 525 opts.generator, | 525 opts.generator, |
| 1307 | 1307 |
| 1308 def flush(self): | 1308 def flush(self): |
| 1309 self._outfp.flush() | 1309 self._outfp.flush() |
| 1310 | 1310 |
| 1311 | 1311 |
| 1312 class TreesumWriter(WriterBase): | 1312 class TaggedTreesumWriter(WriterBase): |
| 1313 | 1313 |
| 1314 """Writer to write treesum digest files in a format similar to BSD | 1314 """Writer to write treesum digest files in a format similar to BSD |
| 1315 digest files. | 1315 digest files. |
| 1316 | 1316 |
| 1317 Provides high-level methods to write data lines. | 1317 Provides high-level methods to write data lines. |
| 1318 | 1318 |
| 1319 """ | 1319 """ |
| 1320 | 1320 |
| 1321 def __init__(self, outfp, **kwds): | 1321 def __init__(self, outfp, **kwds): |
| 1322 # IGNORE **kwds | 1322 # IGNORE **kwds |
| 1323 super(TreesumWriter, self).__init__(outfp) | 1323 super(TaggedTreesumWriter, self).__init__(outfp) |
| 1324 | 1324 |
| 1325 def start(self, version): | 1325 def start(self, version): |
| 1326 """Begin a new block, reset the current CRC and write the VERSION | 1326 """Begin a new block, reset the current CRC and write the VERSION |
| 1327 tag. | 1327 tag. |
| 1328 | 1328 |
