Search in sources :

Example 1 with HgIncomingCommand

use of org.zmlx.hg4idea.command.HgIncomingCommand in project intellij-community by JetBrains.

the class HgRemoteStatusUpdater method updateChangesStatusSynchronously.

private void updateChangesStatusSynchronously(Project project, VirtualFile[] roots, HgChangesetStatus status, boolean incoming) {
    if (!myProjectSettings.isCheckIncomingOutgoing())
        return;
    final List<HgRevisionNumber> changesets = new LinkedList<>();
    for (VirtualFile root : roots) {
        if (incoming) {
            changesets.addAll(new HgIncomingCommand(project).executeInCurrentThread(root));
        } else {
            changesets.addAll(new HgOutgoingCommand(project).executeInCurrentThread(root));
        }
    }
    status.setChanges(changesets.size(), new ChangesetFormatter(status, changesets));
}
Also used : VirtualFile(com.intellij.openapi.vfs.VirtualFile) HgIncomingCommand(org.zmlx.hg4idea.command.HgIncomingCommand) HgOutgoingCommand(org.zmlx.hg4idea.command.HgOutgoingCommand) LinkedList(java.util.LinkedList)

Aggregations

VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 LinkedList (java.util.LinkedList)1 HgIncomingCommand (org.zmlx.hg4idea.command.HgIncomingCommand)1 HgOutgoingCommand (org.zmlx.hg4idea.command.HgOutgoingCommand)1