Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
( )
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/changelog.py (6 lines) | |||
M | mercurial/repoview.py (6 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
self._realopener = opener | self._realopener = opener | ||||
self._delayed = False | self._delayed = False | ||||
self._delaybuf = None | self._delaybuf = None | ||||
self._divert = False | self._divert = False | ||||
self.filteredrevs = frozenset() | self.filteredrevs = frozenset() | ||||
self._copiesstorage = opener.options.get(b'copies-storage') | 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): | def rev(self, node): | ||||
"""filtered version of revlog.rev""" | """filtered version of revlog.rev""" | ||||
r = super(changelog, self).rev(node) | r = super(changelog, self).rev(node) | ||||
if r in self.filteredrevs: | if r in self.filteredrevs: | ||||
raise error.FilteredLookupError( | raise error.FilteredLookupError( | ||||
hex(node), self.indexfile, _(b'filtered node') | hex(node), self.indexfile, _(b'filtered node') | ||||
) | ) | ||||
return r | return r |
# old c extensions without filter handling. | # old c extensions without filter handling. | ||||
except AttributeError: | except AttributeError: | ||||
return self._headrevs() | return self._headrevs() | ||||
if self.filteredrevs: | if self.filteredrevs: | ||||
revs = self._checknofilteredinrevs(revs) | revs = self._checknofilteredinrevs(revs) | ||||
return super(filteredchangelog, self).headrevs(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 | cl.__class__ = filteredchangelog | ||||
return cl | return cl | ||||
class repoview(object): | class repoview(object): | ||||
"""Provide a read/write view of a repo through a filtered changelog | """Provide a read/write view of a repo through a filtered changelog | ||||
This object is used to access a filtered version of a repository without | This object is used to access a filtered version of a repository without |