[MERGE] forward-sorting puts mainline revisions first

Robert Collins robertc at robertcollins.net
Mon Jun 26 09:11:54 BST 2006


On Fri, 2006-06-23 at 11:55 -0500, John Arbash Meinel wrote:
> Aaron Bentley wrote:
> > Hi all,
> > 
> > This patch changes the sorting done by log --forward (and relatedly,
> > pull -v), so that mainline revisions always appear before the merged
> > revisions.  e.g.
> 
> ...
> 
> This is very nice, but I think it is incomplete. At each level, the
> children should be sorted with their parents. This is actually the same
> problem as our 'dir_sorted' issue. Only we don't easily have a prefix
> that we can use.
> 
> If it isn't clear, this is my idea, if we have a double nested merge,
> when we reverse it, we should reverse each chunk separately, and keep it
> after the parent.
> 
> So if it is currently like this:
> 
> 9
> 8
> 7
>  6
>  5
>   4
>   3
> 2
> 1
> 
> When reversed it should be:
> 
> 1
> 2
> 7
>  5
>   3
>   4
>  6
> 8
> 9
> 
> At least that makes it more consistent. Where the things that were
> merged, come after the revision that merged them. And children are in
> the same direction as the parents.

I agree with this. The right place to do that is in the merge_sort
routine as it happens. Thats a little non trivial to change without
performance implications, but I think the right way is probably very
simple once isolated.

Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060626/d775f694/attachment.pgp 


More information about the bazaar mailing list