[BUG] bug in weave.join() code

John Arbash Meinel john at arbash-meinel.com
Tue Jan 24 20:21:02 GMT 2006


I found a pretty large bug in the Weave.join() code, which causes the
code to freak out quite a bit. Specifically the code:

if name in self._names:
    idx = self.lookup(name)
    n1 = map(other.idx_to_name, other._parents[other_idx] )
    n2 = map(self.idx_to_name, self._parents[other_idx] )
    if sha1 ==  self._sha1s[idx] and n1 == n2:
        continue

Notice that it uses other_idx instead of 'idx' so this should be:
    n2 = map(self.idx_to_name, self._parents[idx] )

Also, in testing, I found that we still have a lot of mismatched
parents. Specifically we have inverted parent heirarchy. For example:

 inventory merge 3189/3202 0:00:01
version {robertc at robertcollins.net-20060121104246-604e9a6a3eb8e10b}
present, but different parents:
['robertc at robertcollins.net-20060121095439-042130d88768fcb2',
'john at arbash-meinel.com-20060120193409-1466a4908863d28f'] vs
['john at arbash-meinel.com-20060120193409-1466a4908863d28f',
'robertc at robertcollins.net-20060121095439-042130d88768fcb2']
All changes applied successfully.

Now this could actually be my fault. It might be caused by my
clean-weave plugin. But auditing my code, it doesn't look like that is
the case.

John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060124/88574da6/attachment.pgp 


More information about the bazaar mailing list