Reputation: 999
I need to interrogate a file under perforce control from ant and do stuff with that perforce meta data(labels/tags, latest revision number,...).
<target name="doSomethingWithP4MetaData">
????
<echo>${aP4File.lastId} </echo>
<echo>${aP4File.description}</echo>
</target>
Problem is that p4stat examples does not look like it does what I want to do.
Any suggestions? Thanks for any help
Upvotes: 0
Views: 340
Reputation: 4850
You may want to take a look at the Ant integration we built a couple years ago, P4Ant. Here are the docs on its fstat method:
http://www.perforce.com/perforce/doc.current/manuals/p4ant/p4tasks.html#p4jfstat
You can grab the tool from our website.
edit: extending the answer a bit so I can have proper formatting to address your comment:
You want P4JChanges then: http://www.perforce.com/perforce/doc.current/manuals/p4ant/p4tasks.html#p4jchanges
With it you can do:
<p4jchanges
maxmostrecent="1"
files="..."
/>
the list of changelist numbers will be put in the 'p4.changelists' property.
Upvotes: 2