Search in sources :

Example 6 with Revision

use of org.netbeans.lib.cvsclient.command.log.Revision in project intellij-community by JetBrains.

the class CvsChangeListsBuilder method revisionWrappersFromLog.

@Nullable
public List<RevisionWrapper> revisionWrappersFromLog(final LogInformationWrapper log) {
    final String file = log.getFile();
    if (!CvsChangeList.isAncestor(myRootPath, file)) {
        return null;
    }
    final List<RevisionWrapper> result = new ArrayList<>();
    for (Revision revision : log.getRevisions()) {
        if (revision != null) {
            if (CvsChangeList.DEAD_STATE.equals(revision.getState()) && revision.getMessage().contains(INITIALLY_ADDED_ON_BRANCH)) {
                // the file is never actually deleted)
                continue;
            }
            final String branchName = getBranchName(revision, log.getSymbolicNames());
            result.add(new RevisionWrapper(file, revision, branchName));
        }
    }
    return result;
}
Also used : Revision(org.netbeans.lib.cvsclient.command.log.Revision) Nullable(org.jetbrains.annotations.Nullable)

Aggregations

Revision (org.netbeans.lib.cvsclient.command.log.Revision)6 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 File (java.io.File)2 Nullable (org.jetbrains.annotations.Nullable)2 CvsChangeList (com.intellij.cvsSupport2.changeBrowser.CvsChangeList)1 CvsEnvironment (com.intellij.cvsSupport2.connections.CvsEnvironment)1 CvsOperationExecutor (com.intellij.cvsSupport2.cvsExecution.CvsOperationExecutor)1 DefaultCvsOperationExecutorCallback (com.intellij.cvsSupport2.cvsExecution.DefaultCvsOperationExecutorCallback)1 CommandCvsHandler (com.intellij.cvsSupport2.cvshandlers.CommandCvsHandler)1 LocalPathIndifferentLogOperation (com.intellij.cvsSupport2.cvsoperations.cvsLog.LocalPathIndifferentLogOperation)1 SimpleRevision (com.intellij.cvsSupport2.cvsoperations.dateOrRevision.SimpleRevision)1 CvsRevisionNumber (com.intellij.cvsSupport2.history.CvsRevisionNumber)1 CvsResult (com.intellij.openapi.cvsIntegration.CvsResult)1 ProcessCanceledException (com.intellij.openapi.progress.ProcessCanceledException)1 Ref (com.intellij.openapi.util.Ref)1 Change (com.intellij.openapi.vcs.changes.Change)1 ContentRevision (com.intellij.openapi.vcs.changes.ContentRevision)1 Date (java.util.Date)1 List (java.util.List)1 LogInformation (org.netbeans.lib.cvsclient.command.log.LogInformation)1