use of org.tmatesoft.svn.core.wc2.SvnTarget in project intellij-community by JetBrains.
the class SvnDiffFromHistoryHandler method getChangesBetweenRevisions.
@NotNull
@Override
protected List<Change> getChangesBetweenRevisions(@NotNull FilePath path, @NotNull SvnFileRevision rev1, @Nullable SvnFileRevision rev2) throws VcsException {
File file = path.getIOFile();
SvnTarget target1 = SvnTarget.fromURL(SvnUtil.createUrl(rev1.getURL()), rev1.getRevision());
SvnTarget target2 = rev2 != null ? SvnTarget.fromURL(SvnUtil.createUrl(rev2.getURL()), rev2.getRevision()) : SvnTarget.fromFile(file);
return executeDiff(path, target1, target2);
}
use of org.tmatesoft.svn.core.wc2.SvnTarget in project intellij-community by JetBrains.
the class SvnDiffFromHistoryHandler method getAffectedChanges.
@NotNull
@Override
protected List<Change> getAffectedChanges(@NotNull FilePath path, @NotNull SvnFileRevision rev) throws VcsException {
// Diff with zero revision is used here to get just affected changes under the path, and not all affected changes of the revision.
SvnTarget target1 = SvnTarget.fromURL(SvnUtil.createUrl(rev.getURL()), SVNRevision.create(0));
SvnTarget target2 = SvnTarget.fromURL(SvnUtil.createUrl(rev.getURL()), rev.getRevision());
return executeDiff(path, target1, target2);
}
use of org.tmatesoft.svn.core.wc2.SvnTarget in project intellij-community by JetBrains.
the class SingleCommittedListProvider method searchFromHead.
// return changed path, if any
private FilePath searchFromHead(@NotNull SVNURL url) throws VcsException {
final SvnCopyPathTracker pathTracker = new SvnCopyPathTracker(repositoryUrl.toDecodedString(), repositoryRelativeUrl);
SvnTarget target = SvnTarget.fromURL(url);
myVcs.getFactory(target).createHistoryClient().doLog(target, SVNRevision.HEAD, revisionBefore, false, true, false, 0, null, logEntry -> {
checkDisposed();
if (logEntry.getDate() != null) {
pathTracker.accept(logEntry);
if (logEntry.getRevision() == revisionBefore.getNumber()) {
changeList[0] = createChangeList(logEntry);
}
}
});
FilePath path = pathTracker.getFilePath(myVcs);
return path == null ? filePath : path;
}
use of org.tmatesoft.svn.core.wc2.SvnTarget in project intellij-community by JetBrains.
the class SingleCommittedListProvider method searchForUrl.
private boolean searchForUrl(@NotNull SVNURL url) throws VcsException {
LogEntryConsumer handler = logEntry -> {
checkDisposed();
if (logEntry.getDate() != null) {
changeList[0] = createChangeList(logEntry);
}
};
SvnTarget target = SvnTarget.fromURL(url);
try {
myVcs.getFactory(target).createHistoryClient().doLog(target, revisionBefore, revisionBefore, false, true, false, 1, null, handler);
} catch (SvnBindException e) {
LOG.info(e);
if (!e.containsCategory(SVNErrorCode.FS_CATEGORY)) {
throw e;
}
}
return changeList[0] != null;
}
use of org.tmatesoft.svn.core.wc2.SvnTarget in project intellij-community by JetBrains.
the class FirstInBranch method run.
@Nullable
public CopyData run() throws VcsException {
SvnTarget trunk = SvnTarget.fromURL(createUrl(myAbsoluteTrunkUrl), SVNRevision.HEAD);
SvnTarget branch = SvnTarget.fromURL(createUrl(myAbsoluteBranchUrl), SVNRevision.HEAD);
CopyData result = find(new BranchPoint(trunk), new BranchPoint(branch), true);
debug(result);
return result;
}
Aggregations