Efficiently comparing manifests
Benoit Boissinot
bboissin at gmail.com
Fri May 14 09:06:49 CDT 2010
On Thu, May 13, 2010 at 9:27 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Thu, 2010-05-13 at 15:11 -0400, Greg Ward wrote:
>> On Thu, May 13, 2010 at 3:02 PM, Matt Mackall <mpm at selenic.com> wrote:
>> > On Thu, 2010-05-13 at 14:44 -0400, Greg Ward wrote:
>>
>> But dummy merges add an entry to the manifest log: new entry, new node
>> ID, same content as first parent.
>
> Ahh, right. That may or may not be a bug.
>
probably a bug, as we "fix" this case for filelogs.
> If you want to be clever, you can still get away with doing half the
> work:
>
> m = manifest.read(node)
> h = hash(m, otherp1, otherp2) # calculate the hash assuming unchanged
> return h == other
or:
m = manifest.read(node)
manifest.cmp(other, m)
(which does the hash trick)
but in general the slowness can happen because the manifest are read
in the "wrong" order. It's always interesting to check order.
regards,
Benoit
More information about the Mercurial-devel
mailing list