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 |
In D9881#150425, @pulkit wrote:This should be marked as an API change or a entry should be added in releasenotes.
I plan to add an entry for the full patch series.
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/revlog.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| d3c5593c04b8 | a6fdb060edeb | Joerg Sonnenberger | Jan 26 2021, 6:55 PM |
| Status | Author | Revision | |
|---|---|---|---|
| Closed | joerg.sonnenberger | ||
| Closed | joerg.sonnenberger | ||
| Closed | joerg.sonnenberger | ||
| Closed | joerg.sonnenberger | ||
| Closed | joerg.sonnenberger |
| node = node or self.hash(rawtext, p1, p2) | node = node or self.hash(rawtext, p1, p2) | ||||
| if self.index.has_node(node): | if self.index.has_node(node): | ||||
| return node | return node | ||||
| if validatehash: | if validatehash: | ||||
| self.checkhash(rawtext, node, p1=p1, p2=p2) | self.checkhash(rawtext, node, p1=p1, p2=p2) | ||||
| return self.addrawrevision( | rev = self.addrawrevision( | ||||
| rawtext, | rawtext, | ||||
| transaction, | transaction, | ||||
| link, | link, | ||||
| p1, | p1, | ||||
| p2, | p2, | ||||
| node, | node, | ||||
| flags, | flags, | ||||
| cachedelta=cachedelta, | cachedelta=cachedelta, | ||||
| deltacomputer=deltacomputer, | deltacomputer=deltacomputer, | ||||
| ) | ) | ||||
| return node | |||||
| def addrawrevision( | def addrawrevision( | ||||
| self, | self, | ||||
| rawtext, | rawtext, | ||||
| transaction, | transaction, | ||||
| link, | link, | ||||
| p1, | p1, | ||||
| p2, | p2, | ||||
| node, | node, | ||||
| flags, | flags, | ||||
| cachedelta=None, | cachedelta=None, | ||||
| deltacomputer=None, | deltacomputer=None, | ||||
| ): | ): | ||||
| """add a raw revision with known flags, node and parents | """add a raw revision with known flags, node and parents | ||||
| useful when reusing a revision not stored in this revlog (ex: received | useful when reusing a revision not stored in this revlog (ex: received | ||||
| over wire, or read from an external bundle). | over wire, or read from an external bundle). | ||||
| """ | """ | ||||
| dfh = None | dfh = None | ||||
| if not self._inline: | if not self._inline: | ||||
| dfh = self._datafp(b"a+") | dfh = self._datafp(b"a+") | ||||
| ifh = self._indexfp(b"a+") | ifh = self._indexfp(b"a+") | ||||
| try: | try: | ||||
| self._addrevision( | return self._addrevision( | ||||
| node, | node, | ||||
| rawtext, | rawtext, | ||||
| transaction, | transaction, | ||||
| link, | link, | ||||
| p1, | p1, | ||||
| p2, | p2, | ||||
| flags, | flags, | ||||
| cachedelta, | cachedelta, | ||||
| ifh, | ifh, | ||||
| dfh, | dfh, | ||||
| deltacomputer=deltacomputer, | deltacomputer=deltacomputer, | ||||
| ) | ) | ||||
| return node | |||||
| finally: | finally: | ||||
| if dfh: | if dfh: | ||||
| dfh.close() | dfh.close() | ||||
| ifh.close() | ifh.close() | ||||
| def compress(self, data): | def compress(self, data): | ||||
| """Generate a possibly-compressed representation of data.""" | """Generate a possibly-compressed representation of data.""" | ||||
| if not data: | if not data: | ||||