Mercurial > public > mercurial-scm > hg-stable
comparison contrib/byteify-strings.py @ 42723:11498aa91c03
byteify-strings: add --version argument
This is indispensable for automated tools to detect changes in behavior.
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Tue, 06 Aug 2019 14:54:25 +0200 |
parents | f9b64ff9d26b |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
42722:f9b64ff9d26b | 42723:11498aa91c03 |
---|---|
276 fp.close() | 276 fp.close() |
277 tryunlink(fp.name) | 277 tryunlink(fp.name) |
278 | 278 |
279 def main(): | 279 def main(): |
280 ap = argparse.ArgumentParser() | 280 ap = argparse.ArgumentParser() |
281 ap.add_argument('--version', action='version', | |
282 version='Byteify strings 1.0') | |
281 ap.add_argument('-i', '--inplace', action='store_true', default=False, | 283 ap.add_argument('-i', '--inplace', action='store_true', default=False, |
282 help='edit files in place') | 284 help='edit files in place') |
283 ap.add_argument('--dictiter', action='store_true', default=False, | 285 ap.add_argument('--dictiter', action='store_true', default=False, |
284 help='rewrite iteritems() and itervalues()'), | 286 help='rewrite iteritems() and itervalues()'), |
285 ap.add_argument('--allow-attr-methods', action='store_true', | 287 ap.add_argument('--allow-attr-methods', action='store_true', |