java - How can i get all Changelists of a branch since a specific Changelist? -


i use perforce java api make list of changelists since specific changelist of branch. on command line can with: p4 changes -l branchname@changelistid,#head. use api.

 list<ifilespec> filespecs = new arraylist<>();  filepath path = new filepath(pathtype.depot, p4branch + "/...");  filespec filespec = new filespec(path);  filespec.setchangelistid(changelist.getid());  printfilespec(filespec);  filespecs.add(filespec);   try {      changelists = server.getchangelists(100, filespecs, null, null, false, true, false, true);       if(changelists.isempty()) {             system.out.println("empty changelists");         } else {             system.out.println("changelists has " + changelists.size() + " elements");         }     } catch (exception e) {         e.printstacktrace();     } 

with filespec.setchangelistid(changelist.getid()); can set give me changelists before changelist (which similar command: p4 changes -l branchname@changelistid that's exact how filespecs looks.

is there possibility set in api achieve this? or have use different methods of api?

thanks.

try building filespecs way:

list<ifilespec> filespecs = filespecbuilder.makefilespeclist(p4branch + "/...@" + changelist.getid() + ",#head"); 

Comments

Popular posts from this blog

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -