Show More
@@ -399,8 +399,9 class revbranchcache: | |||||
399 | threshold = current_size * REWRITE_RATIO |
|
399 | threshold = current_size * REWRITE_RATIO | |
400 | if (max(end, current_size) - start) < threshold: |
|
400 | if (max(end, current_size) - start) < threshold: | |
401 | # end affected, let overwrite the bad value |
|
401 | # end affected, let overwrite the bad value | |
|
402 | overwritten = min(end, current_size) - start | |||
402 | dbg = b"overwriting %d bytes from %d in cache/%s" |
|
403 | dbg = b"overwriting %d bytes from %d in cache/%s" | |
403 |
dbg %= ( |
|
404 | dbg %= (overwritten, start, _rbcrevs) | |
404 | if end < current_size: |
|
405 | if end < current_size: | |
405 | extra = b" leaving (%d trailing bytes)" |
|
406 | extra = b" leaving (%d trailing bytes)" | |
406 | extra %= current_size - end |
|
407 | extra %= current_size - end |
@@ -835,7 +835,7 recovery from invalid cache revs file wi | |||||
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 |
|
838 | overwriting 0 bytes from 160 in cache/rbc-revs-v2 leaving (2 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 |
General Comments 0
You need to be logged in to leave comments.
Login now