This happens when a LFS delta base gets a non-LFS delta from another client.
In that case, the LFS delta base needs to be converted to non-LFS version
before applying the delta.
Details
- Reviewers
indygreg ryanmce - Group Reviewers
hg-reviewers - Commits
- rHG369aadf7a326: revlog: resolve lfs rawtext to vanilla rawtext before applying delta
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.
Event Timeline
I'd like to see the next versions of hte previous 2 patches before looking at this because this patch will likely get some minor rework as well.
This change is a bit difficult to reason about. But I think it is fine.
Essentially, we're ensuring that the delta stored in the revlog is applied on top of the fulltext after flag transformation rather than before. In the common case where we have no flag processors, this doesn't matter. In the case of LFS, it ensures LFS content resolution is performed first so we can delta against that.
On the addrevision side, we're now taking the size of the flag resolved content rather than the raw content. In the common case of no flag processors, the new behavior is identical. In the case of LFS, we compute the size of the LFS resolved data rather than the pointer record.