use of com.intellij.cvsSupport2.application.CvsEntriesManager in project intellij-community by JetBrains.
the class CvsCommittedChangesProvider method isDifferentBranch.
private static boolean isDifferentBranch(final FilePath filePath, final CvsChangeList changeList) {
final String localTag;
final CvsEntriesManager cvsEntriesManager = CvsEntriesManager.getInstance();
final VirtualFile parent = filePath.getVirtualFileParent();
if (parent != null) {
final Entry entry = cvsEntriesManager.getEntryFor(parent, filePath.getName());
if (entry != null) {
localTag = entry.getStickyTag();
} else {
localTag = getDirectoryTag(parent);
}
} else {
final VirtualFile validParent = ChangesUtil.findValidParentAccurately(filePath);
if (validParent == null)
return false;
localTag = getDirectoryTag(validParent);
}
final String remoteTag = changeList.getBranch();
if (!Comparing.equal(localTag, remoteTag)) {
if (LOG.isDebugEnabled())
LOG.info(filePath + ": local tag " + localTag + ", remote tag " + remoteTag);
return true;
}
return false;
}
Aggregations