最近的标签在mercurial之前提示

Ada*_*deg 5 versioning tags mercurial

我标记版本hg tag <version-number>.当我发布错误修复时,我不想增加版本号,但我想在构建过程中使用最新的版本号.如果我运行hg tags,它将tip首先显示,然后版本号按降序显示.我可以让它运行hg tags | head -n2 | tail -n1.我想知道是否有更优雅,纯粹的善变方式来获得它.

Ada*_*deg 10

好吧,我正在回答我自己的问题.我找到了解决方案,hg help templates显示了比mercurial网站上的文档更多的选项.所以hg tip --template '{latesttag}\n'我正在寻找.