Incorrect results from annotate on packs
Aaron Bentley
aaron at aaronbentley.com
Sat Dec 29 15:39:45 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Lukáš Lalinský wrote:
> On Dec 29, 2007 9:14 AM, Aaron Bentley <aaron at aaronbentley.com> wrote:
>> Lukáš Lalinský wrote:
> As I said, we seem to have different definitions of what annotate
> should do. With knits it shows the first revision, according to the
> topological order from bzrlib.topo_sort, in which the line appeared.
> That is, if you have a revision C, which merges A and B, both of which
> independantly change the same line the same way, the one is that is
> lower in the topo order wins (or differently, you never overwrite
> origins of identical lines with newer revisions).
Frankly, I wasn't aware of this. When we determine the
Inventory.revision property, we use this same algorithm to determine
which revision was the last to modify a file. When I wrote reannotate,
I assumed we should use that algorithm. That said, I have tried
filtering it with Graph.heads(). It cleans up the graph a lot, but not
as much as I hoped it would.
> But
> annotate.reannotate uses revision C, because revisions A and B don't
> agree on the origin. I personally don't find this information useful,
> but at least now I know it's correct according to the current
> definition in bzrlib. I expected annotate to behave the same way on
> knits and packs, so I thought it was incorrect.
On first blush, using topological order seems random, because it's not a
total ordering. But maybe showing *an* origin is better than showing
something that's not a true origin. I'll think on it. IIRC, there was
some impact on weave merging.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFHdmpA0F+nu1YWqI0RAuhSAJsFAHil1/YZqzP5xMhycxYYxXxRZgCeMJQE
pR1HhpOreVySXG1OR8mKHzI=
=O6Hg
-----END PGP SIGNATURE-----
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: dag3
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20071229/b6222607/attachment-0001.diff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dag3.svg
Type: image/svg+xml
Size: 28627 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071229/b6222607/attachment-0001.svg
More information about the bazaar
mailing list