Incorrect results from annotate on packs

Lukáš Lalinský lalinsky at gmail.com
Sat Dec 29 15:50:39 GMT 2007


On So, 2007-12-29 at 10:39 -0500, Aaron Bentley wrote:
> 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.

Well, it's not that random, because bzrlib.topo_sort will always sort
the input deterministically. It has one nice property, which I always
liked about bzr - if you never pull, only merge, historical data in your
branch won't be modified. The current bzrlib.knit.annotate_knit breaks
this, because when you merge a revision which does the same change as
you already have in your branch, annotate will tell you that the origin
of that change is the merge, not your original revision.

Lukas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071229/c3fde88b/attachment.pgp 


More information about the bazaar mailing list