Details
Details
- Reviewers
marmoute pulkit - Group Reviewers
hg-reviewers - Commits
- rHGd6a9e690d620: comments: fix typos
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Branch
- default
- Lint
No Linters Available - Unit
No Unit Test Coverage
| marmoute | |
| pulkit |
| hg-reviewers |
| No Linters Available |
| No Unit Test Coverage |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/repoview.py (2 lines) | |||
| M | mercurial/revlogutils/sidedata.py (6 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 508ffcef0611 | af3bc4caf9f3 | Joerg Sonnenberger | Jan 7 2021, 8:15 AM |
| - you garbage collect hidden changeset, | - you garbage collect hidden changeset, | ||||
| - public phase is moved backward, | - public phase is moved backward, | ||||
| - something is changed in the filtering (this could be fixed) | - something is changed in the filtering (this could be fixed) | ||||
| This filter out any mutable changeset and any public changeset that may be | This filter out any mutable changeset and any public changeset that may be | ||||
| impacted by something happening to a mutable revision. | impacted by something happening to a mutable revision. | ||||
| This is achieved by filtered everything with a revision number egal or | This is achieved by filtered everything with a revision number equal or | ||||
| higher than the first mutable changeset is filtered.""" | higher than the first mutable changeset is filtered.""" | ||||
| assert not repo.changelog.filteredrevs | assert not repo.changelog.filteredrevs | ||||
| cl = repo.changelog | cl = repo.changelog | ||||
| firstmutable = len(cl) | firstmutable = len(cl) | ||||
| roots = repo._phasecache.nonpublicphaseroots(repo) | roots = repo._phasecache.nonpublicphaseroots(repo) | ||||
| if roots: | if roots: | ||||
| firstmutable = min(firstmutable, min(cl.rev(r) for r in roots)) | firstmutable = min(firstmutable, min(cl.rev(r) for r in roots)) | ||||
| # protect from nullrev root | # protect from nullrev root | ||||
| # sidedata.py - Logic around store extra data alongside revlog revisions | # sidedata.py - Logic around store extra data alongside revlog revisions | ||||
| # | # | ||||
| # Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net) | # Copyright 2019 Pierre-Yves David <pierre-yves.david@octobus.net) | ||||
| # | # | ||||
| # This software may be used and distributed according to the terms of the | # This software may be used and distributed according to the terms of the | ||||
| # GNU General Public License version 2 or any later version. | # GNU General Public License version 2 or any later version. | ||||
| """core code for "sidedata" support | """core code for "sidedata" support | ||||
| The "sidedata" are stored alongside the revision without actually being part of | The "sidedata" are stored alongside the revision without actually being part of | ||||
| its content and not affecting its hash. It's main use cases is to cache | its content and not affecting its hash. It's main use cases is to cache | ||||
| important information related to a changesets. | important information related to a changesets. | ||||
| The current implementation is experimental and subject to changes. Do not rely | The current implementation is experimental and subject to changes. Do not rely | ||||
| on it in production. | on it in production. | ||||
| Sidedata are stored in the revlog itself, withing the revision rawtext. They | Sidedata are stored in the revlog itself, within the revision rawtext. They | ||||
| are inserted, removed from it using the flagprocessors mechanism. The following | are inserted and removed from it using the flagprocessors mechanism. The following | ||||
| format is currently used:: | format is currently used:: | ||||
| initial header: | initial header: | ||||
| <number of sidedata; 2 bytes> | <number of sidedata; 2 bytes> | ||||
| sidedata (repeated N times): | sidedata (repeated N times): | ||||
| <sidedata-key; 2 bytes> | <sidedata-key; 2 bytes> | ||||
| <sidedata-entry-length: 4 bytes> | <sidedata-entry-length: 4 bytes> | ||||
| <sidedata-content-sha1-digest: 20 bytes> | <sidedata-content-sha1-digest: 20 bytes> | ||||
| <sidedata-content; X bytes> | <sidedata-content; X bytes> | ||||
| normal raw text: | normal raw text: | ||||
| <all bytes remaining in the rawtext> | <all bytes remaining in the rawtext> | ||||
| This is a simple and effective format. It should be enought to experiment with | This is a simple and effective format. It should be enough to experiment with | ||||
| the concept. | the concept. | ||||
| """ | """ | ||||
| from __future__ import absolute_import | from __future__ import absolute_import | ||||
| import struct | import struct | ||||
| from .. import error | from .. import error | ||||