ant perforce - 使用perforce版本号设置ant属性

时间:2013-07-03 20:00:38

标签: ant perforce

我需要在antforce perforce控制下查询文件,并使用perforce元数据(标签/标签,最新版本号,......)来处理。

<target name="doSomethingWithP4MetaData">
      ????

     <echo>${aP4File.lastId} </echo>
     <echo>${aP4File.description}</echo>
</target>

问题是p4stat示例看起来不像我想做的那样。

有什么建议吗? 谢谢你的帮助

1 个答案:

答案 0 :(得分:2)

您可能想看看我们几年前建立的Ant集成P4Ant。以下是其fstat方法的文档:

http://www.perforce.com/perforce/doc.current/manuals/p4ant/p4tasks.html#p4jfstat

您可以抓取工具from our website.

编辑:延长答案,以便我可以使用适当的格式来解决你的评论:

然后你想要P4JChanges:http://www.perforce.com/perforce/doc.current/manuals/p4ant/p4tasks.html#p4jchanges

有了它,你可以这样做:

<p4jchanges
    maxmostrecent="1"
    files="..."
/>

更改列表编号列表将放在“p4.changelists”属性中。

相关问题