Mercurial > evolve
changeset 4591:9242b05eb593
evolve: use standard InterventionRequired instead of MergeFailure
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 19 Apr 2019 10:47:12 -0700 |
parents | 784ad6f60571 |
children | e489c10add37 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Fri Apr 19 10:41:56 2019 -0700 +++ b/hgext3rd/evolve/evolvecmd.py Fri Apr 19 10:47:12 2019 -0700 @@ -180,7 +180,7 @@ newid = relocate(repo, orig, target, evolvestate, pctx, keepbranch, 'orphan') return (True, newid) - except MergeFailure: + except error.InterventionRequired: ops = {'current': orig.node()} evolvestate.addopts(ops) evolvestate.save() @@ -249,7 +249,7 @@ operation='evolve') bumped = new evolvestate['temprevs'].append(newnode) - except MergeFailure: + except error.InterventionRequired: evolvestate['current'] = bumped.hex() evolvestate['precursor'] = prec.hex() evolvestate.save() @@ -514,7 +514,7 @@ try: newother = relocate(repo, other, divergent.p1(), evolvestate, keepbranch=True) - except MergeFailure: + except error.InterventionRequired: evolvestate['current'] = other.node() evolvestate.save() raise error.InterventionRequired(_("fix conflicts and see `hg help " @@ -893,9 +893,6 @@ return desc -class MergeFailure(error.Abort): - pass - def _orderrevs(repo, revs): """Compute an ordering to solve instability for the given revs @@ -991,8 +988,8 @@ orig.p1().rev()) dirstatedance(repo, dest, orig.node(), None) tr.close() # to keep changes in this transaction (e.g. dirstate) - raise MergeFailure(_('unresolved merge conflicts ' - '(see hg help resolve)')) + raise error.InterventionRequired(_('unresolved merge conflicts ' + '(see hg help resolve)')) nodenew = _relocatecommit(repo, orig, commitmsg) _finalizerelocate(repo, orig, dest, nodenew, tr, category, evolvestate) return nodenew