Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
No Linters Available |
No Unit Test Coverage |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/changelog.py (6 lines) | |||
M | mercurial/repoview.py (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
9b3e0d7b6389 | feb42fc7b6f5 | Martin von Zweigbergk | Nov 5 2019, 5:33 PM |
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 flags(self, rev): | |||||
"""filtered version of revlog.flags""" | |||||
if rev in self.filteredrevs: | |||||
raise error.FilteredIndexError(rev) | |||||
return super(changelog, self).flags(rev) | |||||
def delayupdate(self, tr): | def delayupdate(self, tr): | ||||
b"delay visibility of index updates to other readers" | b"delay visibility of index updates to other readers" | ||||
if not self._delayed: | if not self._delayed: | ||||
if len(self) == 0: | if len(self) == 0: | ||||
self._divert = True | self._divert = True | ||||
if self._realopener.exists(self.indexfile + b'.a'): | if self._realopener.exists(self.indexfile + b'.a'): | ||||
self._realopener.unlink(self.indexfile + b'.a') | self._realopener.unlink(self.indexfile + b'.a') |
return super(filteredchangelog, self).linkrev(rev) | return super(filteredchangelog, self).linkrev(rev) | ||||
def parentrevs(self, rev): | def parentrevs(self, rev): | ||||
"""filtered version of revlog.parentrevs""" | """filtered version of revlog.parentrevs""" | ||||
if rev in self.filteredrevs: | if rev in self.filteredrevs: | ||||
raise error.FilteredIndexError(rev) | raise error.FilteredIndexError(rev) | ||||
return super(filteredchangelog, self).parentrevs(rev) | return super(filteredchangelog, self).parentrevs(rev) | ||||
def flags(self, rev): | |||||
"""filtered version of revlog.flags""" | |||||
if rev in self.filteredrevs: | |||||
raise error.FilteredIndexError(rev) | |||||
return super(filteredchangelog, self).flags(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 |