[PATCH] rebase: invalidate caches before stripping (issue1951)

Benoit Boissinot bboissin at gmail.com
Thu Feb 25 07:43:25 CST 2010


On Thu, Feb 11, 2010 at 6:01 PM, Stefano Tortarolo
<stefano.tortarolo at gmail.com> wrote:
> 2010/2/11 Dirkjan Ochtman <dirkjan at ochtman.nl>
>>
>> On Thu, Feb 11, 2010 at 11:51, Stefano Tortarolo
>> <stefano.tortarolo at gmail.com> wrote:
>> > Well, the problem is that strip uses an old branchcache and fails in
>> > finding
>> > the node.
>> > Hence, strip fails -> rebase fails.
>> > That's exactly what happens in issue1951.
>>
>> Well, I think it'd be better to update the cache instead of removing
>> it. Removing it will mean the next thing that has to instantiate it
>> will be *very* slow, so it would be nice if we could prevent that.
>>
>
> Yes, it would be better if we could update just the cache, but should rebase
> modify branchcache "manually"?
> It doesn't seem to exist a suitable function to ask for a branchcache
> update.
>

Sorry about that, but I think updating manually is currently too
intrusive. Moreover it was a bug that the branchcache was not
invalidated on strip.
I just pushed a fix that makes the code correct, it isn't more
expensive than the previous code because without this fix the cache
would be invalidated/rebuild on the next call anyway.
We just avoid the window where the cache is plain wrong and rebuild it
sooner if necessary.

regards,

Benoit


More information about the Mercurial-devel mailing list