Mercurial > evolve
changeset 3495:a7cac3fcc49d
evolve: store the skippedrevs in evolvestate
While doing `hg evolve`, there are some revs which are skipped as they can't be
evolved. Before this patch, we did not store this information in evolvestate and
neither they were evolved, so `hg evolve --continue` will again try to stabilize
those revisions. As much time as we run `hg evolve --continue`, this will
happen which is not a good behavior.
This patch adds a skippedrevs list to evolvestate where we store such revisions
so that we don't try to stabilize them again.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Tue, 30 Jan 2018 00:00:45 +0530 |
parents | 14cd04ff968e |
children | af2602c354d8 |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 9 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Mon Jan 29 00:09:44 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Tue Jan 30 00:00:45 2018 +0530 @@ -1152,11 +1152,14 @@ for rev in evolvestate['revs']: # XXX: prevent this lookup by storing nodes instead of revnums curctx = unfi[rev] - if curctx.node() not in evolvestate['replacements']: + if (curctx.node() not in evolvestate['replacements'] and + curctx.node() not in evolvestate['skippedrevs']): newnode = _solveone(ui, repo, curctx, evolvestate, False, confirm, progresscb, category) if newnode[0]: evolvestate['replacements'][curctx.node()] = newnode[1] + else: + evolvestate['skippedrevs'].append(curctx.node()) _cleanup(ui, repo, unfi[startnode], True) evolvestate.delete() @@ -1175,8 +1178,10 @@ if targetcat == 'orphan': revs = _orderrevs(repo, revs) + # cbor does not know how to serialize sets, using list for skippedrevs stateopts = {'category': targetcat, 'replacements': {}, 'revs': revs, - 'confirm': confirmopt, 'startnode': startnode.node()} + 'confirm': confirmopt, 'startnode': startnode.node(), + 'skippedrevs': []} evolvestate.addopts(stateopts) for rev in revs: curctx = repo[rev] @@ -1186,5 +1191,7 @@ seen += 1 if ret[0]: evolvestate['replacements'][curctx.node()] = [ret[1]] + else: + evolvestate['skippedrevs'].append(curctx.node()) progresscb() _cleanup(ui, repo, startnode, showprogress)