Search in sources :

Example 1 with MergeChangeCollector

use of git4idea.merge.MergeChangeCollector in project intellij-community by JetBrains.

the class GitPushOperation method collectUpdatedFiles.

private void collectUpdatedFiles(@NotNull UpdatedFiles updatedFiles, @NotNull GitRepository repository, @NotNull String preUpdatePosition) {
    MergeChangeCollector collector = new MergeChangeCollector(myProject, repository.getRoot(), new GitRevisionNumber(preUpdatePosition));
    ArrayList<VcsException> exceptions = new ArrayList<>();
    collector.collect(updatedFiles, exceptions);
    for (VcsException exception : exceptions) {
        LOG.info(exception);
    }
}
Also used : MergeChangeCollector(git4idea.merge.MergeChangeCollector) GitRevisionNumber(git4idea.GitRevisionNumber) VcsException(com.intellij.openapi.vcs.VcsException)

Example 2 with MergeChangeCollector

use of git4idea.merge.MergeChangeCollector in project intellij-community by JetBrains.

the class GitUpdater method markEnd.

protected void markEnd(VirtualFile root) throws VcsException {
    // find out what have changed, this is done even if the process was cancelled.
    final MergeChangeCollector collector = new MergeChangeCollector(myProject, root, myBefore);
    final ArrayList<VcsException> exceptions = new ArrayList<>();
    collector.collect(myUpdatedFiles, exceptions);
    if (!exceptions.isEmpty()) {
        throw exceptions.get(0);
    }
}
Also used : MergeChangeCollector(git4idea.merge.MergeChangeCollector) VcsException(com.intellij.openapi.vcs.VcsException) ArrayList(java.util.ArrayList)

Aggregations

VcsException (com.intellij.openapi.vcs.VcsException)2 MergeChangeCollector (git4idea.merge.MergeChangeCollector)2 GitRevisionNumber (git4idea.GitRevisionNumber)1 ArrayList (java.util.ArrayList)1