repoview: move changelog.strip() override to filteredchangelog
Differential Revision: https://phab.mercurial-scm.org/D7242
--- a/mercurial/changelog.py Tue Nov 05 14:16:46 2019 -0800
+++ b/mercurial/changelog.py Tue Nov 05 14:17:58 2019 -0800
@@ -404,12 +404,6 @@
self.filteredrevs = frozenset()
self._copiesstorage = opener.options.get(b'copies-storage')
- def strip(self, *args, **kwargs):
- # XXX make something better than assert
- # We can't expect proper strip behavior if we are filtered.
- assert not self.filteredrevs
- super(changelog, self).strip(*args, **kwargs)
-
def rev(self, node):
"""filtered version of revlog.rev"""
r = super(changelog, self).rev(node)
--- a/mercurial/repoview.py Tue Nov 05 14:16:46 2019 -0800
+++ b/mercurial/repoview.py Tue Nov 05 14:17:58 2019 -0800
@@ -288,6 +288,12 @@
revs = self._checknofilteredinrevs(revs)
return super(filteredchangelog, self).headrevs(revs)
+ def strip(self, *args, **kwargs):
+ # XXX make something better than assert
+ # We can't expect proper strip behavior if we are filtered.
+ assert not self.filteredrevs
+ super(filteredchangelog, self).strip(*args, **kwargs)
+
cl.__class__ = filteredchangelog
return cl