perforce - How to get list of changelists not yet integrated using P4J API? -
i'm converting python script calls 'p4 interchanges' (ie command returns changes not yet integrated branch) use jvm language. p4j (http://www.perforce.com/perforce/doc.current/manuals/p4java-javadoc/) api can used reproduce same functionality?
from perforce support:
getinterchangesoptions
passing flags interchanges command, if needed.
use 1 of server.getinterchanges()
methods. recommend using ioptionsserver
interface rather iserver
.
for p4
command line:
p4 interchanges //depot/merges/main/... //depot/merges/release/...
i have p4java equivalent:
ioptionsserver server = serverfactory.getoptionsserver("p4java://perforce:1666", null, null); list<ichangelist> changes = server.getinterchanges( null, filespecbuilder.makefilespeclist(new string[] {"//depot/merges/main/..."}), filespecbuilder.makefilespeclist(new string[] {"//depot/merges/release/..."}), null); for(ichangelist change : changes) { system.out.println(change.getid()); }
Comments
Post a Comment