Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 303:73d13be531b5
treesum: in the "info" command print a sortes list of errors
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Wed, 05 Mar 2025 10:22:29 +0100 |
| parents | bf88323d6bf7 |
| children | ebddfdbc3f7a |
comparison
equal
deleted
inserted
replaced
| 302:bf88323d6bf7 | 303:73d13be531b5 |
|---|---|
| 1620 print(" FNMatch:", f) | 1620 print(" FNMatch:", f) |
| 1621 print(" Algorithm:", algorithm) | 1621 print(" Algorithm:", algorithm) |
| 1622 if algorithm != "SIZE": | 1622 if algorithm != "SIZE": |
| 1623 print(" Digest:", digeststr) | 1623 print(" Digest:", digeststr) |
| 1624 print(" Size:", sizestr) | 1624 print(" Size:", sizestr) |
| 1625 print(" Errors:", errors if errors else "<none>") | 1625 if errors: |
| 1626 errorlist = list(errors) | |
| 1627 errorlist.sort() | |
| 1628 for idx, err in enumerate(errorlist): | |
| 1629 if idx == 0: | |
| 1630 print(" Errors:", err) | |
| 1631 else: | |
| 1632 print(" ", err) | |
| 1633 else: | |
| 1634 print(" Errors: <none>") | |
| 1626 | 1635 |
| 1627 | 1636 |
| 1628 if __name__ == "__main__": | 1637 if __name__ == "__main__": |
| 1629 sys.exit(main()) | 1638 sys.exit(main()) |
