--- a/mercurial/localrepo.py Tue Jul 02 12:55:51 2019 -0400
+++ b/mercurial/localrepo.py Sat Jul 13 23:45:32 2019 -0400
@@ -2578,7 +2578,7 @@
return ret
@unfilteredmethod
- def commitctx(self, ctx, error=False):
+ def commitctx(self, ctx, error=False, origctx=None):
"""Add a new revision to current repository.
Revision information is passed via the context argument.
@@ -2586,6 +2586,12 @@
modified/added/removed files. On merge, it may be wider than the
ctx.files() to be committed, since any file nodes derived directly
from p1 or p2 are excluded from the committed ctx.files().
+
+ origctx is for convert to work around the problem that bug
+ fixes to the files list in changesets change hashes. For
+ convert to be the identity, it can pass an origctx and this
+ function will use the same files list when it makes sense to
+ do so.
"""
p1, p2 = ctx.p1(), ctx.p2()
@@ -2701,6 +2707,9 @@
filesadded = filesadded or None
filesremoved = filesremoved or None
+ if origctx and origctx.manifestnode() == mn:
+ files = origctx.files()
+
# update changelog
self.ui.note(_("committing changelog\n"))
self.changelog.delayupdate(tr)