comparison tests/test-branches.t @ 51974:4c885d5ff132

rev-branch-cache: stop pretending we will overwrite data when we don't We were issuing a message about overwriting data even when we were about to write 0 bytes in pratice. This is silly. Instead we point at the extra data remaining in the file (in case someone is using debug to debug something).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 27 Sep 2024 15:01:43 +0200
parents bb281ecf4036
children 76416b6e9d9b
comparison
equal deleted inserted replaced
51973:bb281ecf4036 51974:4c885d5ff132
833 833
834 recovery from invalid cache revs file with trailing data 834 recovery from invalid cache revs file with trailing data
835 $ echo >> .hg/cache/rbc-revs-v2 835 $ echo >> .hg/cache/rbc-revs-v2
836 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug 836 $ rm -f .hg/cache/branch* && hg head a -T '{rev}\n' --debug
837 5 837 5
838 overwriting 0 bytes from 160 in cache/rbc-revs-v2 leaving (2 trailing bytes) 838 cache/rbc-revs-v2 contains 2 unknown trailing bytes
839 $ f --size .hg/cache/rbc-revs* 839 $ f --size .hg/cache/rbc-revs*
840 .hg/cache/rbc-revs-v2: size=162 840 .hg/cache/rbc-revs-v2: size=162
841 841
842 recovery from invalid cache file with partial last record 842 recovery from invalid cache file with partial last record
843 $ mv .hg/cache/rbc-revs-v2 . 843 $ mv .hg/cache/rbc-revs-v2 .