marmoute created this revision. Herald added a reviewer: hg-reviewers. Herald added a subscriber: mercurial-patches.
REVISION SUMMARY All code have been migrated to the new APIs. REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D11186 AFFECTED FILES mercurial/dirstate.py CHANGE DETAILS diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -775,7 +775,7 @@ if entry.merged_removed or entry.from_p2_removed: source = self._map.copymap.get(f) if entry.merged_removed: - self.merge(f) + self._merge(f) elif entry.from_p2_removed: self._otherparent(f) if source is not None: @@ -859,6 +859,23 @@ def merge(self, f): '''Mark a file merged.''' + if self.pendingparentchange(): + util.nouideprecwarn( + b"do not use `merge` inside of update/merge context." + b" Use `update_file`", + b'6.0', + stacklevel=2, + ) + else: + util.nouideprecwarn( + b"do not use `merge` outside of update/merge context." + b"It should have been set by the update/merge code", + b'6.0', + stacklevel=2, + ) + self._merge(f) + + def _merge(self, f): if not self.in_merge: return self._normallookup(f) return self._otherparent(f) To: marmoute, #hg-reviewers Cc: mercurial-patches, mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel