Thu, 24 Dec 2020 12:23:46 -0500 tests: demonstrate a case where a corrupt tag cache causes an abort
Matt Harbison <matt_harbison@yahoo.com> [Thu, 24 Dec 2020 12:23:46 -0500] rev 46693
tests: demonstrate a case where a corrupt tag cache causes an abort I happened to hit this trying to cover other cases around valid vs missing entries. I have no idea if this is something that could occur more naturally (similar to how a missing file node in `hgtagsfnodes1` can occur after a strip). There is a test just above this added in f5a7cf0adb12 mentioning it "overwrites the junk", though that tests truncation instead of actual garbage. But since this is just a cache, it probably shouldn't abort with a cryptic message like this. The two options I see both have downsides- either rebuild the cache (and potentially take a long time), or hint to the user to run a debug command. Differential Revision: https://phab.mercurial-scm.org/D9812
Tue, 16 Feb 2021 20:38:14 +0530 debugcommands: prevent using `is False`
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 16 Feb 2021 20:38:14 +0530] rev 46692
debugcommands: prevent using `is False` I was touching this code in a future patch and marmoute warned about usage of `is False` here. Quoting marmoute: ``` "is False" is going to check if the object you have the very same object in memory than the one Python allocated for False (in practice 0) This will "mostly work" on cpython because of implementation details, but is semantically wrong and can start breaking unexpectedly ``` Differential Revision: https://phab.mercurial-scm.org/D10014
Tue, 16 Feb 2021 18:43:42 +0530 hgtagsfnodes: refactor code to compute fnode into separate fn
Pulkit Goyal <7895pulkit@gmail.com> [Tue, 16 Feb 2021 18:43:42 +0530] rev 46691
hgtagsfnodes: refactor code to compute fnode into separate fn I plan to use this code at one more place while fixing a bug caused by an invalid fnode present in cache. Differential Revision: https://phab.mercurial-scm.org/D10013
Wed, 10 Feb 2021 17:24:54 +0530 error: remove shortening of node in error message
Pulkit Goyal <7895pulkit@gmail.com> [Wed, 10 Feb 2021 17:24:54 +0530] rev 46690
error: remove shortening of node in error message This strips the complete 20 bytes node which was not found. Having the the full node in error message is important as it makes debugging easier. If a short node is to be displayed, that should be done by callers. Differential Revision: https://phab.mercurial-scm.org/D9994
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -4 +4 +10 +30 +100 +300 +1000 +3000 tip