comparison shasum.py @ 27:c29bd96dcd4f

Put the HG revision into the version output also
author Franz Glasner <fzglas.hg@dom66.de>
date Mon, 07 Dec 2020 02:52:30 +0100
parents ea4bb192c437
children ffcce6062bee
comparison
equal deleted inserted replaced
26:ea4bb192c437 27:c29bd96dcd4f
12 12
13 from __future__ import print_function 13 from __future__ import print_function
14 14
15 15
16 __version__ = "0.1" 16 __version__ = "0.1"
17
18 __revision__ = "|VCSRevision|"
19 __date__ = "|VCSJustDate|"
17 20
18 21
19 import argparse 22 import argparse
20 import hashlib 23 import hashlib
21 import io 24 import io
71 help="alias for the `--bsd' option (to be compatible with :command:`b2sum`)") 74 help="alias for the `--bsd' option (to be compatible with :command:`b2sum`)")
72 aparser.add_argument( 75 aparser.add_argument(
73 "--text", "-t", action="store_true", dest="text_mode", default=False, 76 "--text", "-t", action="store_true", dest="text_mode", default=False,
74 help="read in text mode (not supported)") 77 help="read in text mode (not supported)")
75 aparser.add_argument( 78 aparser.add_argument(
76 "--version", "-v", action="version", version=__version__) 79 "--version", "-v", action="version", version="%s (rv:%s)" % (__version__, __revision__))
77 aparser.add_argument( 80 aparser.add_argument(
78 "files", nargs="*", metavar="FILE") 81 "files", nargs="*", metavar="FILE")
79 82
80 opts = aparser.parse_args(args=argv) 83 opts = aparser.parse_args(args=argv)
81 84