使用来自 Perforce (http://kb.perforce.com/article/1086/p4java-api) 的 p4java 库,我试图找出变更列表中的哪些文件未解决,需要先解决才能提交它们.
IChangelist changelist = getServer().getChangelist(changelistId);
List<IFileSpec> changelistPendingFiles = changelist.getFiles(false);
在这个列表中,我试图找出仍然需要解决的 IFileSpec。
像这样的东西:
for (IFileSpec pendingFile : changelistPendingFiles) {
// How to find out if pendingFile needs to be resolved?
FileAction action = pendingFile.getAction();
// The above results in "FileAction.EDIT",
// but that doesn't tell me anything about the unresolved state
// The "diffStatus" variable for this pendingFile is "pending"
// The "howResolved" variable for this pendingFile is null
// The "opStatus" variable for this pendingFile is VALID
}
感谢您提供的任何东西!