prune: have dirstate collaborate with transaction
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 30 Oct 2015 16:04:37 +0000
changeset 1515 9729fdcc1fab
parent 1514 324cd13838f1
child 1516 c4f8a2916e43
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.
hgext/evolve.py
--- a/hgext/evolve.py	Fri Oct 30 16:04:19 2015 +0000
+++ b/hgext/evolve.py	Fri Oct 30 16:04:37 2015 +0000
@@ -2328,7 +2328,7 @@
                 dirchanges = [f for f in dirstate if dirstate[f] != 'n']
                 changedfiles.extend(dirchanges)
                 repo.dirstate.rebuild(newnode.node(), newnode.manifest(), changedfiles)
-                repo.dirstate.write()
+                writedirstate(dirstate, tr)
             else:
                 bookactive = bmactive(repo)
                 # Active bookmark that we don't want to delete (with -B option)