Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGbf5dc156bb4c: remotefilelog: remove deprecated API
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
( )
| hg-reviewers |
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | hgext/remotefilelog/remotefilelog.py (12 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| de7df77bba1e | 791f5d5f7a96 | Raphaël Gomès | Dec 23 2021, 8:47 AM |
| from mercurial.node import bin | from mercurial.node import bin | ||||
| from mercurial.i18n import _ | from mercurial.i18n import _ | ||||
| from mercurial import ( | from mercurial import ( | ||||
| ancestor, | ancestor, | ||||
| error, | error, | ||||
| mdiff, | mdiff, | ||||
| pycompat, | pycompat, | ||||
| revlog, | revlog, | ||||
| util, | |||||
| ) | ) | ||||
| from mercurial.utils import storageutil | from mercurial.utils import storageutil | ||||
| from mercurial.revlogutils import flagutil | from mercurial.revlogutils import flagutil | ||||
| from . import ( | from . import ( | ||||
| constants, | constants, | ||||
| fileserverclient, | fileserverclient, | ||||
| shallowutil, | shallowutil, | ||||
| def node(self, rev): | def node(self, rev): | ||||
| # This is a hack. | # This is a hack. | ||||
| if isinstance(rev, int): | if isinstance(rev, int): | ||||
| raise error.ProgrammingError( | raise error.ProgrammingError( | ||||
| b'remotefilelog does not convert integer rev to node' | b'remotefilelog does not convert integer rev to node' | ||||
| ) | ) | ||||
| return rev | return rev | ||||
| def _processflags(self, text, flags, operation, raw=False): | |||||
| """deprecated entry point to access flag processors""" | |||||
| msg = b'_processflag(...) use the specialized variant' | |||||
| util.nouideprecwarn(msg, b'5.2', stacklevel=2) | |||||
| if raw: | |||||
| return text, flagutil.processflagsraw(self, text, flags) | |||||
| elif operation == b'read': | |||||
| return flagutil.processflagsread(self, text, flags) | |||||
| else: # write operation | |||||
| return flagutil.processflagswrite(self, text, flags) | |||||
| def revision(self, node, raw=False): | def revision(self, node, raw=False): | ||||
| """returns the revlog contents at this node. | """returns the revlog contents at this node. | ||||
| this includes the meta data traditionally included in file revlogs. | this includes the meta data traditionally included in file revlogs. | ||||
| this is generally only used for bundling and communicating with vanilla | this is generally only used for bundling and communicating with vanilla | ||||
| hg clients. | hg clients. | ||||
| """ | """ | ||||
| if node == self.repo.nullid: | if node == self.repo.nullid: | ||||
| return b"" | return b"" | ||||