com.intellij.openapi.vcs.history.VcsAppendableHistorySessionPartner Java Examples
The following examples show how to use
com.intellij.openapi.vcs.history.VcsAppendableHistorySessionPartner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: P4HistoryProvider.java From p4ic4idea with Apache License 2.0 | 5 votes |
@Override public void reportAppendableHistory(FilePath path, VcsAppendableHistorySessionPartner partner) { partner.reportCreatedEmptySession(createAppendableSession( path, Collections.emptyList(), null)); ClientConfigRoot root = getRootFor(path); if (root == null) { LOG.info("File not under VCS: " + path); // TODO bundle message partner.reportException(new VcsException("File not under VCS: " + path)); // Deprecated in 191. partner.finished(); return; } // Async operation. getHistory(root, path, -1) .whenCompleted((r) -> { r.getRevisions(formatter, loader).forEach(partner::acceptRevision); // Deprecated in 191. partner.finished(); }) .whenServerError((e) -> { LOG.warn(e); partner.reportException(e); // Deprecated in 191. partner.finished(); }); }
Example #2
Source File: TFSHistoryProvider.java From azure-devops-intellij with MIT License | 4 votes |
public void reportAppendableHistory(final FilePath path, final VcsAppendableHistorySessionPartner partner) throws VcsException { final VcsHistorySession session = createSessionFor(path); partner.reportCreatedEmptySession((VcsAbstractHistorySession) session); }
Example #3
Source File: P4HistoryProvider.java From p4ic4idea with Apache License 2.0 | 4 votes |
@Override public void reportAppendableHistory(@NotNull FilePath path, @Nullable VcsRevisionNumber startingRevision, @NotNull VcsAppendableHistorySessionPartner partner) { partner.reportCreatedEmptySession(createAppendableSession( path, Collections.emptyList(), null)); ClientConfigRoot root = getRootFor(path); if (root == null) { LOG.warn("File not under vcs: " + path); // TODO bundle message partner.reportException(new VcsException("File not under VCS: " + path)); partner.finished(); return; } final int startingRev; if (startingRevision instanceof VcsRevisionNumber.Int) { startingRev = ((VcsRevisionNumber.Int) startingRevision).getValue(); } else { startingRev = 0; if (startingRevision != null) { LOG.warn("Requested reportAppendableHistory with unexpected type " + startingRevision + " (" + startingRevision.getClass() + ")"); } } // Async operation getHistory(root, path, -1) .whenCompleted((r) -> r.getRevisions(formatter, loader).forEach((rev) -> { VcsRevisionNumber rn = rev.getRevisionNumber(); if (rn instanceof VcsRevisionNumber.Int) { VcsRevisionNumber.Int rni = (VcsRevisionNumber.Int) rn; if (rni.getValue() >= startingRev) { partner.acceptRevision(rev); } } else { LOG.warn("VcsFileRevision returned unexpected revision number " + rn + " (" + rn.getClass() + ")"); } }) ) .whenServerError(partner::reportException) .whenAnyState(partner::finished); }
Example #4
Source File: VcsHistoryProviderEx.java From consulo with Apache License 2.0 | 4 votes |
void reportAppendableHistory(@Nonnull FilePath path, @Nullable VcsRevisionNumber startingRevision, @Nonnull VcsAppendableHistorySessionPartner partner) throws VcsException;