我尝试使用以下目标在我的 ant 脚本中添加一些标签信息,但出现错误 (Result=-1),并且 hg 告诉我它无法识别该命令:
<target name="-post-init">
<exec outputproperty="hg.tag" executable="hg">
<arg value="parents --template {latesttag}+{latesttagdistance}" />
</exec>
</target>
如果我只包含value="parents"
,它就可以正常工作。
如果我运行命令行 hgparents --template {latesttag}+{latesttagdistance}
它也可以正常工作。
对我的语法有什么问题有什么想法吗?
最佳答案
刚刚尝试过,效果很好:
<exec outputproperty="hg.tag" executable="hg">
<arg value="parents" />
<arg value="--template" />
<arg value="{latesttag}+{latesttagdistance}" />
</exec>
我需要拆分参数。
关于java - Ant 与 Mercurial ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10216843/