comparison hgext/evolve.py @ 1515:9729fdcc1fab

prune: have dirstate collaborate with transaction With 3.6, dirstate update can work with transaction to ensure proper rollback. We do it if the mercurial version permit it.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Fri, 30 Oct 2015 16:04:37 +0000
parents 324cd13838f1
children c4f8a2916e43
comparison
equal deleted inserted replaced
1514:324cd13838f1 1515:9729fdcc1fab
2326 # reset files that only changed in the dirstate too 2326 # reset files that only changed in the dirstate too
2327 dirstate = repo.dirstate 2327 dirstate = repo.dirstate
2328 dirchanges = [f for f in dirstate if dirstate[f] != 'n'] 2328 dirchanges = [f for f in dirstate if dirstate[f] != 'n']
2329 changedfiles.extend(dirchanges) 2329 changedfiles.extend(dirchanges)
2330 repo.dirstate.rebuild(newnode.node(), newnode.manifest(), changedfiles) 2330 repo.dirstate.rebuild(newnode.node(), newnode.manifest(), changedfiles)
2331 repo.dirstate.write() 2331 writedirstate(dirstate, tr)
2332 else: 2332 else:
2333 bookactive = bmactive(repo) 2333 bookactive = bmactive(repo)
2334 # Active bookmark that we don't want to delete (with -B option) 2334 # Active bookmark that we don't want to delete (with -B option)
2335 # we deactivate and move it before the update and reactivate it 2335 # we deactivate and move it before the update and reactivate it
2336 # after 2336 # after