[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mercurial
Subject:    Re: revision ranges
From:       Matt Mackall <mpm () selenic ! com>
Date:       2008-11-21 22:21:58
Message-ID: 1227306118.3293.326.camel () calx
[Download RAW message or body]

On Fri, 2008-11-21 at 22:37 +0100, Gilles Moris wrote:
> On Fri November 21 2008 12:47:08 Benoit Boissinot wrote:
> > > BEGIN:END denotes the revisions which are greater than or equal to BEGIN
> > > and less than or equal to END.
> > >
> > > But how this "A greater than B" defined? Does it mean that B is a
> > > descendant of A or just that B has higher revision number than B?
> > 
> > Higher revision number (as shown by hg log). You can get more precise ranges
> > with the parentspec extension (I think Matt is not opposed to a similar
> > feature in core hg).
> > 
> 
> OK, but doesn't it give more information though.
> As I understand from http://en.wikipedia.org/wiki/Directed_acyclic_graph 
> a DAG will give rise to a partial ordering, so my understanding is that:
> 
> if you have two HG rev numbers A and B such that a A > B, then
> - A can NOT be an ascendant of B, though it can be a descendant
> - B can NOT be a descendant of A, though it can be an ascendant
> 
> Am I right ?
 
Right. Revision numbers are a topological ordering of the DAG. All
ancestors of X have a revision number before X. This means revision
numbers are also "causal": if you visit revisions in numerical order,
you never see a bug fixed before it was introduced.

This is a good approximation of chronological order, given that we can
have multiple parallel branches of development.

And it arises naturally from our append-only history rule: revisions are
numbered based on the order they were added to the history. Since you
can never add a child before its parent, revisions are topologically
sorted automatically.

-- 
Mathematics is the supreme nostalgia of our time.

_______________________________________________
Mercurial mailing list
Mercurial@selenic.com
http://selenic.com/mailman/listinfo/mercurial
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic