Mercurial > evolve
changeset 4052:73e73471d6c6
pick: replace "grabstate" with "pickstate"
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 31 Aug 2018 09:20:21 +0200 |
parents | ddae36b4031e |
children | ecbf61d90807 |
files | hgext3rd/evolve/__init__.py hgext3rd/evolve/cmdrewrite.py tests/test-evolve.t tests/test-grab.t |
diffstat | 4 files changed, 16 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Fri Aug 31 09:19:13 2018 +0200 +++ b/hgext3rd/evolve/__init__.py Fri Aug 31 09:20:21 2018 +0200 @@ -1403,7 +1403,7 @@ cmdutil.unfinishedstates.append(data) afterresolved = ('evolvestate', _('hg evolve --continue')) - grabresolved = ('grabstate', _('hg grab --continue')) + grabresolved = ('pickstate', _('hg pick --continue')) cmdutil.afterresolvedstates.append(afterresolved) cmdutil.afterresolvedstates.append(grabresolved)
--- a/hgext3rd/evolve/cmdrewrite.py Fri Aug 31 09:19:13 2018 +0200 +++ b/hgext3rd/evolve/cmdrewrite.py Fri Aug 31 09:20:21 2018 +0200 @@ -1337,7 +1337,7 @@ revs.append(opts['rev']) with repo.wlock(), repo.lock(), repo.transaction('pick'): - grabstate = state.cmdstate(repo, path='grabstate') + pickstate = state.cmdstate(repo, path='pickstate') pctx = repo['.'] if not cont and not abort: @@ -1361,17 +1361,17 @@ stats = merge.graft(repo, origctx, origctx.p1(), ['local', 'destination']) if compat.hasconflict(stats): - grabstate.addopts({'orignode': origctx.node(), + pickstate.addopts({'orignode': origctx.node(), 'oldpctx': pctx.node()}) - grabstate.save() + pickstate.save() raise error.InterventionRequired(_("unresolved merge conflicts" " (see hg help resolve)")) elif abort: - if not grabstate: + if not pickstate: raise error.Abort(_("no interrupted pick state exists")) - grabstate.load() - pctxnode = grabstate['oldpctx'] + pickstate.load() + pctxnode = pickstate['oldpctx'] ui.status(_("aborting pick, updating to %s\n") % node.hex(pctxnode)[:12]) hg.updaterepo(repo, pctxnode, True) @@ -1381,11 +1381,11 @@ if revs: raise error.Abort(_("cannot specify both --continue and " "revision")) - if not grabstate: + if not pickstate: raise error.Abort(_("no interrupted pick state exists")) - grabstate.load() - orignode = grabstate['orignode'] + pickstate.load() + orignode = pickstate['orignode'] origctx = repo[orignode] overrides = {('phases', 'new-commit'): origctx.phase()} @@ -1394,8 +1394,8 @@ user=origctx.user(), date=origctx.date(), extra=origctx.extra()) - if grabstate: - grabstate.delete() + if pickstate: + pickstate.delete() newctx = repo[newnode] if newnode else pctx obsolete.createmarkers(repo, [(origctx, (newctx,))], operation="pick")
--- a/tests/test-evolve.t Fri Aug 31 09:19:13 2018 +0200 +++ b/tests/test-evolve.t Fri Aug 31 09:20:21 2018 +0200 @@ -639,7 +639,7 @@ $ echo 3 > 1 $ hg resolve -m 1 (no more unresolved files) - continue: hg grab --continue + continue: hg pick --continue $ hg grab --continue $ glog --hidden @ 8:fb2c0f0a0c54@default(draft) conflict
--- a/tests/test-grab.t Fri Aug 31 09:19:13 2018 +0200 +++ b/tests/test-grab.t Fri Aug 31 09:20:21 2018 +0200 @@ -174,7 +174,7 @@ $ echo foobar > c $ hg resolve --all --mark (no more unresolved files) - continue: hg grab --continue + continue: hg pick --continue $ hg grab --continue $ hg glog @ 8:44e155eb95c7 add c @@ -211,7 +211,7 @@ $ echo foobar > c $ hg resolve -m (no more unresolved files) - continue: hg grab --continue + continue: hg pick --continue $ hg grab --continue note: picking 9:4e04628911f6 created no changes to commit @@ -293,7 +293,7 @@ $ echo bar > b $ hg resolve -m (no more unresolved files) - continue: hg grab --continue + continue: hg pick --continue $ hg grab --continue $ hg phase -r .