comparison hgext/fix.py @ 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 d6970628b95f
children 32fba6fe893d
comparison
equal deleted inserted replaced
38419:6dea017eb6ba 38420:c1f4364f9336
131 if opts['all']: 131 if opts['all']:
132 if opts['rev']: 132 if opts['rev']:
133 raise error.Abort(_('cannot specify both "--rev" and "--all"')) 133 raise error.Abort(_('cannot specify both "--rev" and "--all"'))
134 opts['rev'] = ['not public() and not obsolete()'] 134 opts['rev'] = ['not public() and not obsolete()']
135 opts['working_dir'] = True 135 opts['working_dir'] = True
136 with repo.wlock(), repo.lock(): 136 with repo.wlock(), repo.lock(), repo.transaction('fix'):
137 revstofix = getrevstofix(ui, repo, opts) 137 revstofix = getrevstofix(ui, repo, opts)
138 basectxs = getbasectxs(repo, opts, revstofix) 138 basectxs = getbasectxs(repo, opts, revstofix)
139 workqueue, numitems = getworkqueue(ui, repo, pats, opts, revstofix, 139 workqueue, numitems = getworkqueue(ui, repo, pats, opts, revstofix,
140 basectxs) 140 basectxs)
141 filedata = collections.defaultdict(dict) 141 filedata = collections.defaultdict(dict)