[PATCH] [RFC] convert: fix --datesort

Matt Mackall mpm at selenic.com
Thu Dec 20 13:50:29 CST 2007


On Thu, Dec 20, 2007 at 11:03:47AM +0300, Kirill Smelkov wrote:
> ?? ?????????????????? ???? 19 ?????????????? 2007 04:51 Matt Mackall ??????????????(a):
> > On Wed, Dec 19, 2007 at 01:52:22AM +0300, Maxim Dounin wrote:
> > > Hello!
> > >
> > > On Thu, 13 Dec 2007, Kirill Smelkov wrote:
> > > > # HG changeset patch
> > > > # User Kirill Smelkov <kirr at mns.spb.ru>
> > > > # Date 1197567565 -10800
> > > > # Node ID 7a1570348d6df8f59289eddaee9452393033b078
> > > > # Parent  eb2f94f6aeabff1638e0ad3c46fcbe80bf4e8fc2
> > > > [RFC] convert: fix --datesort
> > > >
> > > > The problem is that previously commit.date was used for sorting, but
> > > > it's a string like "1 Jan xxx 2007", so it it wrong to use it for
> > > > sorting.
> > > >
> > > > Another problem is that why we are using depth for sorting -- I have no
> > > > clear answer -- it seems to be plain wrong.
> > >
> > > As far as I understand, depth is here to make sure parent changeset
> > > always commited before it's child regardless of dates specified.
> > >
> > > I don't think dropping this invariant is a good idea.
> >
> > Indeed, and it fails tests in our test suite.
> >
> > But never fear, I already fixed it and pushed it to mainline.
> 
> I agree that commits habe to go after their parents, but sorting on depth is 
> wrong too.

Sounds like we'll need to do something smarter with toposort then.

-- 
Mathematics is the supreme nostalgia of our time.


More information about the Mercurial-devel mailing list