This is similar to what we have done for changegroups. It is needed to make
sure the delta application code path can assume deltas are always against
vanilla (ex. non-LFS) rawtext so the next fix becomes possible.
Details
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Event Timeline
| mercurial/revlog.py | ||
|---|---|---|
| 411 | Same comment as previous review: this leaves a foot gun if we ever introduce revision flags that aren't related to content presence. We need something to help prevent this footgun. | |
| mercurial/revlog.py | ||
|---|---|---|
| 2110 | Why is this not candelta()? | |
| mercurial/revlog.py | ||
|---|---|---|
| 2110 | candelta takes two revisions. Here there is only one revision. It's possible to pass a useless revision but that has unnecessary overhead. candelta also fetches flags, here we already know the values flags so it's faster to avoid fetching it again. | |
| mercurial/revlog.py | ||
|---|---|---|
| 2110 | Then why is this REVIDX_KNOWN_FLAGS and not REVIDX_RAWTEXT_CHANGING_FLAGS? Given the number of questions here from me and others, I think the comment could use extension at least so future readers understand why this is the way it is. | |
| mercurial/revlog.py | ||
|---|---|---|
| 2110 | Should be REVIDX_RAWTEXT_CHANGING_FLAGS. I'll make the change. | |
| tests/test-revlog-raw.py | ||
|---|---|---|
| 156–164 | I feel like this should be checking against specific flags. But since this is a test, I'm fine accepting this. We can fix in a follow-up if the logic is wrong. | |
| tests/test-revlog-raw.py | ||
|---|---|---|
| 156–164 | Seems I missed this line somehow. Will change in a minute. | |
Same comment as previous review: this leaves a foot gun if we ever introduce revision flags that aren't related to content presence. We need something to help prevent this footgun.