Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: is the order of the revision numbers compatible with the topological order of changesets?

Tags:

mercurial

For two changesets X and Y of the same Mercurial repository, does following condition always hold true:

if X is a parent of Y, then revision(X) < revision(Y)

?

If it holds true, is it by specification or just how it's currently implemented? With other words, can one rely on that condition for future Mercurial releases?

like image 287
mstrap Avatar asked Sep 16 '11 11:09

mstrap


1 Answers

Yes, the revision numbers reflect some topological ordering of the changesets.

The revision numbers you see are simply the order of the revlog entries for the changelog, and revlogs entries are always topologically sorted. Put differently, the revision numbers are handed out in sequence in a given repository, and you cannot pull in a child before you pull in its ancestors.

like image 175
Martin Geisler Avatar answered Sep 30 '22 17:09

Martin Geisler