我想通过 Java 代码获得对 P4 分支的锁定。有人知道通过Java实现它吗?
我使用下面的代码:
IBranchSpec ibranchSpec = underlyingPerforceOptionsServer .getBranchSpec("//Tools/Patch/bin/");
ibranchSpec.setLocked(true);
这里的问题是ibranchSpec
包含所有仓库,我不知道为什么。
setLock API 说,它只有在服务器更新完成后才会开始工作。我尝试使用类似的东西:
ibranchSpec.Update();
它抛出异常。有任何想法吗?
com.perforce.p4java.exception.RequestException: Error in branch specification.
You cannot use the default branch view; it is just a sample.