Mercurial > public > mercurial-scm > hg-stable
comparison hgext/githelp.py @ 38163:a40cc6d7d8c3
githelp: cleanup one more abort message
This makes the string localizable, uses the more standard hint argument, quotes
the problem option so it stands out, and kills a stray apostrophe.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Tue, 22 May 2018 23:48:08 -0400 |
parents | c65931d23baf |
children | cfa93fbbe9b4 |
comparison
equal
deleted
inserted
replaced
38162:c65931d23baf | 38163:a40cc6d7d8c3 |
---|---|
92 else: | 92 else: |
93 raise error.Abort(_("unknown option %s") % ex.opt) | 93 raise error.Abort(_("unknown option %s") % ex.opt) |
94 try: | 94 try: |
95 args.remove(flag) | 95 args.remove(flag) |
96 except Exception: | 96 except Exception: |
97 raise error.Abort( | 97 msg = _("unknown option '{0}' packed with other options") |
98 "unknown option {0} packed with other options\n" | 98 hint = _("please try passing the option as its own flag: -{0}") |
99 "Please try passing the option as it's own flag: -{0}" \ | 99 raise error.Abort(msg.format(ex.opt), hint=hint.format(ex.opt)) |
100 .format(ex.opt)) | |
101 | 100 |
102 ui.warn(_("ignoring unknown option %s\n") % flag) | 101 ui.warn(_("ignoring unknown option %s\n") % flag) |
103 | 102 |
104 args = list([convert(x) for x in args]) | 103 args = list([convert(x) for x in args]) |
105 opts = dict([(k, convert(v)) if isinstance(v, str) else (k, v) | 104 opts = dict([(k, convert(v)) if isinstance(v, str) else (k, v) |