# HG changeset patch # User Pierre-Yves David # Date 1709913128 -3600 # Node ID 18c2753434f2ab58d1cf51bf1934efabf48339da # Parent 659f766629c8ed9c6e202060cd134fb5af3961b3 branchcache: explicitly assert that copy is always about inheritance This would catch cases where copy is used for something else if any existed. diff -r 659f766629c8 -r 18c2753434f2 mercurial/branchmap.py --- a/mercurial/branchmap.py Sat Mar 09 02:07:15 2024 +0100 +++ b/mercurial/branchmap.py Fri Mar 08 16:52:08 2024 +0100 @@ -556,6 +556,7 @@ def copy(self, repo): """return a deep copy of the branchcache object""" + assert repo.filtername != self._filtername other = type(self)( repo=repo, # we always do a shally copy of self._entries, and the values is