##// END OF EJS Templates
fix: rewrite writeworkingdir() to explicitly not work with merges...
Martin von Zweigbergk -
r48566:3feda1e7 stable
parent child Browse files
Show More
@@ -132,6 +132,7 b' import subprocess'
132 132
133 133 from mercurial.i18n import _
134 134 from mercurial.node import (
135 nullid,
135 136 nullrev,
136 137 wdirrev,
137 138 )
@@ -753,16 +754,18 b' def writeworkingdir(repo, ctx, filedata,'
753 754
754 755 Directly updates the dirstate for the affected files.
755 756 """
757 assert repo.dirstate.p2() == nullid
758
756 759 for path, data in pycompat.iteritems(filedata):
757 760 fctx = ctx[path]
758 761 fctx.write(data, fctx.flags())
759 762 if repo.dirstate[path] == b'n':
760 763 repo.dirstate.set_possibly_dirty(path)
761 764
762 oldparentnodes = repo.dirstate.parents()
763 newparentnodes = [replacements.get(n, n) for n in oldparentnodes]
764 if newparentnodes != oldparentnodes:
765 repo.setparents(*newparentnodes)
765 oldp1 = repo.dirstate.p1()
766 newp1 = replacements.get(oldp1, oldp1)
767 if newp1 != oldp1:
768 repo.setparents(newp1, nullid)
766 769
767 770
768 771 def replacerev(ui, repo, ctx, filedata, replacements):
General Comments 0
You need to be logged in to leave comments. Login now