Search in sources :

Example 1 with SvnRepositoryContentRevision

use of org.jetbrains.idea.svn.history.SvnRepositoryContentRevision in project intellij-community by JetBrains.

the class ShowPropertiesDiffAction method getPropertyList.

@NotNull
private static List<PropertyData> getPropertyList(@NotNull SvnVcs vcs, @Nullable final ContentRevision contentRevision, @Nullable final SVNRevision revision) throws SVNException, VcsException {
    if (contentRevision == null) {
        return Collections.emptyList();
    }
    SvnTarget target;
    if (contentRevision instanceof SvnRepositoryContentRevision) {
        final SvnRepositoryContentRevision svnRevision = (SvnRepositoryContentRevision) contentRevision;
        target = SvnTarget.fromURL(SVNURL.parseURIEncoded(svnRevision.getFullPath()), revision);
    } else {
        final File ioFile = contentRevision.getFile().getIOFile();
        target = SvnTarget.fromFile(ioFile, revision);
    }
    return getPropertyList(vcs, target, revision);
}
Also used : SvnRepositoryContentRevision(org.jetbrains.idea.svn.history.SvnRepositoryContentRevision) SvnTarget(org.tmatesoft.svn.core.wc2.SvnTarget) File(java.io.File) NotNull(org.jetbrains.annotations.NotNull)

Example 2 with SvnRepositoryContentRevision

use of org.jetbrains.idea.svn.history.SvnRepositoryContentRevision in project intellij-community by JetBrains.

the class PointMerger method doMerge.

protected void doMerge() throws VcsException {
    for (Change change : mySelectedChanges) {
        SvnRepositoryContentRevision before = (SvnRepositoryContentRevision) change.getBeforeRevision();
        SvnRepositoryContentRevision after = (SvnRepositoryContentRevision) change.getAfterRevision();
        if (before == null) {
            //noinspection ConstantConditions
            add(after);
        } else if (after == null) {
            delete(before);
        } else {
            merge(before, after);
        }
    }
}
Also used : SvnRepositoryContentRevision(org.jetbrains.idea.svn.history.SvnRepositoryContentRevision) Change(com.intellij.openapi.vcs.changes.Change)

Aggregations

SvnRepositoryContentRevision (org.jetbrains.idea.svn.history.SvnRepositoryContentRevision)2 Change (com.intellij.openapi.vcs.changes.Change)1 File (java.io.File)1 NotNull (org.jetbrains.annotations.NotNull)1 SvnTarget (org.tmatesoft.svn.core.wc2.SvnTarget)1