Mercurial > hg
changeset 38420:c1f4364f9336
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
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Wed, 20 Jun 2018 09:27:30 -0700 |
parents | 6dea017eb6ba |
children | 7fbb5d76c555 |
files | hgext/fix.py tests/test-fix-topology.t |
diffstat | 2 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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,