Mercurial: is the order of the revision numbers compatible with the topological order of changesets?
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 curre开发者_如何学Pythonntly implemented? With other words, can one rely on that condition for future Mercurial releases?
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.
精彩评论