Commit 520c4df0 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

fix: include cleanupnodes() in transaction

As pointed out by Yuya, we need a transaction to make sure the state
before the call to cleanupnodes() is not observable.

Differential Revision: https://phab.mercurial-scm.org/D3823
parent 6dea017eb6ba
......@@ -133,7 +133,7 @@ def fix(ui, repo, *pats, **opts):
raise error.Abort(_('cannot specify both "--rev" and "--all"'))
opts['rev'] = ['not public() and not obsolete()']
opts['working_dir'] = True
with repo.wlock(), repo.lock():
with repo.wlock(), repo.lock(), repo.transaction('fix'):
revstofix = getrevstofix(ui, repo, opts)
basectxs = getbasectxs(repo, opts, revstofix)
workqueue, numitems = getworkqueue(ui, repo, pats, opts, revstofix,
......
......@@ -322,7 +322,6 @@ replacing anything that isn't public.
$ hg fix --all
1 new orphan changesets
$ hg log --graph --template '{rev} {desc}\n' -r 'sort(all(), topo)' --hidden
o 11 fifth
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment