开发者

Perforce P4J getting change lists for a directory

开发者 https://www.devze.com 2022-12-09 00:35 出处:网络
I am trying to开发者_如何学编程 get the changelists on a directory using P4J. Here is the snippet I used,

I am trying to开发者_如何学编程 get the changelists on a directory using P4J. Here is the snippet I used,

P4JServer server = //get a valid server using username/pwd
List<P4JFileSpec> fileSpec = P4JFileSpecBuilder.makeFileSpecList(new String[]{"//depot/se/mydir"}); //a valid directory
if(P4JFileSpecBuilder.getValidFileSpecs(fileSpec).isEmpty()) {
    throw new RuntimeException("File spec invalid for [" + depotPath + "]"); 
}
List<P4JChangeList> changes = server.getChangeLists(10, fileSpec, null, null, true, true, false, true);
System.out.println(changes.size()); //prints 0 here   

However if I used "//depot/se/myfile" which is a valid file this prints changelists. Am I doing something wrong? I need changelists on a directory.


The directory name should be given as

"//depot/se/mydir/..." and not "//depot/se/mydir"

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号