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 node(self, rev): | |||||
"""filtered version of revlog.node""" | |||||
if rev in self.filteredrevs: | |||||
raise error.FilteredIndexError(rev) | |||||
return super(changelog, self).node(rev) | |||||
def linkrev(self, rev): | def linkrev(self, rev): | ||||
"""filtered version of revlog.linkrev""" | """filtered version of revlog.linkrev""" | ||||
if rev in self.filteredrevs: | if rev in self.filteredrevs: | ||||
raise error.FilteredIndexError(rev) | raise error.FilteredIndexError(rev) | ||||
return super(changelog, self).linkrev(rev) | return super(changelog, self).linkrev(rev) | ||||
def parentrevs(self, rev): | def parentrevs(self, rev): | ||||
"""filtered version of revlog.parentrevs""" | """filtered version of revlog.parentrevs""" |
"""filtered version of revlog.rev""" | """filtered version of revlog.rev""" | ||||
r = super(filteredchangelog, self).rev(node) | r = super(filteredchangelog, 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 | ||||
def node(self, rev): | |||||
"""filtered version of revlog.node""" | |||||
if rev in self.filteredrevs: | |||||
raise error.FilteredIndexError(rev) | |||||
return super(filteredchangelog, self).node(rev) | |||||
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 |