Mercurial > hgrepos > DevTools > mercurial-extensions
diff extensions/revinfo.py @ 102:702d473b6d85
FIX: The "mercurial.util.Abort" alias is gone: use the mercurial.error.Abort instead.
Validated that "mercurial.error.Abort" exists on Mercurial v3.1.2.
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Thu, 02 Aug 2018 14:57:14 +0200 |
| parents | d7c453c740ef |
| children | 65789e3e8e3d |
line wrap: on
line diff
--- a/extensions/revinfo.py Thu Aug 02 13:37:50 2018 +0200 +++ b/extensions/revinfo.py Thu Aug 02 14:57:14 2018 +0200 @@ -10,7 +10,7 @@ from mercurial.i18n import _ -from mercurial import commands, cmdutil, scmutil, util, archival +from mercurial import commands, cmdutil, scmutil, util, error, archival cmdtable = {} @@ -50,17 +50,17 @@ """ if opts.get("amend") and opts.get("rev"): - raise util.Abort(_("cannot use -r/--rev together with --amend")) + raise error.Abort(_("cannot use -r/--rev together with --amend")) if opts.get("amend"): if not dest: - raise util.Abort(_('need a destination file with --amend')) + raise error.Abort(_('need a destination file with --amend')) with open(dest, "rb") as rfile: msg = rfile.read() else: ctx = scmutil.revsingle(repo, opts.get("rev")) if not ctx: - raise util.Abort(_("no working directory: please specify a revision")) + raise error.Abort(_("no working directory: please specify a revision")) msg = archival.buildmetadata(ctx) @@ -69,7 +69,7 @@ if len(kvparts) == 2: msg += "%s: %s\n" % tuple(kvparts) else: - raise util.Abort(_("given data `%s' is not a KEY=VALUE pair") % (kv, )) + raise error.Abort(_("given data `%s' is not a KEY=VALUE pair") % (kv, )) paths = opts.get("path") #
