Mercurial > hg-stable
view tests/test-rhg-no-generaldelta.t @ 50348:f952be90b051 stable 6.4.2
revlog-split: make sure the self._indexfile attribut is reset (issue6811)
Before this change, after a transaction committing a file split, a revlog
object would have its `self._indexfile` attribute desynchronised from the
actual file storing the data. If that same object is reused (as we do for the
manifest during clone bundles), this lead to the data being writting in the
wrong location and the repository to go corrupt.
We not properly reset the attribut when applicable and everything is back in
working order.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 18 Apr 2023 01:23:27 +0200 |
parents | 96ea4db4741b |
children |
line wrap: on
line source
$ NO_FALLBACK="env RHG_ON_UNSUPPORTED=abort" $ cat << EOF >> $HGRCPATH > [format] > sparse-revlog = no > EOF $ hg init repo --config format.generaldelta=no --config format.usegeneraldelta=no $ cd repo $ (echo header; seq.py 20) > f $ hg commit -q -Am initial $ (echo header; seq.py 20; echo footer) > f $ hg commit -q -Am x $ hg update ".^" 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ (seq.py 20; echo footer) > f $ hg commit -q -Am y $ hg debugdeltachain f --template '{rev} {prevrev} {deltatype}\n' 0 -1 base 1 0 prev 2 1 prev rhg works on non-generaldelta revlogs: $ $NO_FALLBACK hg cat f -r . 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 footer