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 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 |