问题描述
对于相同 Mercurial存储库的两个变更集 X 和 Y ,以下条件始终成立:
For two changesets X and Y of the same Mercurial repository, does following condition always hold true:
如果 X 是 Y 的父代,则修订版(X)< 修订(Y)
if X is a parent of Y, then revision(X) < revision(Y)
?
如果它成立,是按规范说明还是按目前的实现方式?换句话说,未来的Mercurial版本是否可以依靠这种条件?
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?
推荐答案
是的,修订版号反映了变更集的某些拓扑顺序.
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.
这篇关于Mercurial:修订号的顺序是否与变更集的拓扑顺序兼容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!