Mercurial > hgrepos > Python > apps > py-cutils
comparison cutils/treesum.py @ 295:4a259fb9968e
treesum: Add the treesum version and revision to the full generator output
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 28 Feb 2025 14:11:20 +0100 |
| parents | cc2deeb5f2e6 |
| children | bcbc68d8aa12 |
comparison
equal
deleted
inserted
replaced
| 294:2695a76b6630 | 295:4a259fb9968e |
|---|---|
| 498 pass # do nothing | 498 pass # do nothing |
| 499 elif self._with_generator == "normal": | 499 elif self._with_generator == "normal": |
| 500 self._writer.write_generator("PY2" if util.PY2 else "PY3") | 500 self._writer.write_generator("PY2" if util.PY2 else "PY3") |
| 501 elif self._with_generator == "full": | 501 elif self._with_generator == "full": |
| 502 import platform | 502 import platform |
| 503 info = "%s %s, %s" % (platform.python_implementation(), | 503 info = ("treesum %s (rv:%s), %s %s, %s" |
| 504 platform.python_version(), | 504 % (__version__, |
| 505 platform.platform()) | 505 __revision__, |
| 506 platform.python_implementation(), | |
| 507 platform.python_version(), | |
| 508 platform.platform())) | |
| 506 self._writer.write_generator(info) | 509 self._writer.write_generator(info) |
| 507 else: | 510 else: |
| 508 raise NotImplementedError( | 511 raise NotImplementedError( |
| 509 "not implemented: %s" % (self._with_generator,)) | 512 "not implemented: %s" % (self._with_generator,)) |
| 510 | 513 |
