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.
--- 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)