# HG changeset patch # User Martin von Zweigbergk # Date 1529512050 25200 # Node ID c1f4364f9336d3bf1166aa44b38c8043b3d97492 # Parent 6dea017eb6ba434507180d107182b24c80ea54df 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 diff -r 6dea017eb6ba -r c1f4364f9336 hgext/fix.py --- a/hgext/fix.py Tue Jun 19 22:19:37 2018 -0700 +++ b/hgext/fix.py Wed Jun 20 09:27:30 2018 -0700 @@ -133,7 +133,7 @@ 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, diff -r 6dea017eb6ba -r c1f4364f9336 tests/test-fix-topology.t --- a/tests/test-fix-topology.t Tue Jun 19 22:19:37 2018 -0700 +++ b/tests/test-fix-topology.t Wed Jun 20 09:27:30 2018 -0700 @@ -322,7 +322,6 @@ $ hg fix --all - 1 new orphan changesets $ hg log --graph --template '{rev} {desc}\n' -r 'sort(all(), topo)' --hidden o 11 fifth