mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[svn] fix ContentRevision creation for locally non-existing directory
If local path is null, the directory flag should be passed explicitly.
This commit is contained in:
@@ -355,9 +355,10 @@ public class SvnChangeList implements CommittedChangeList {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
});
|
||||
final SvnRepositoryContentRevision contentRevision =
|
||||
SvnRepositoryContentRevision.create(myVcs, myRepositoryRoot, path, localPath, getRevision(isBeforeRevision));
|
||||
return contentRevision;
|
||||
long revision = getRevision(isBeforeRevision);
|
||||
return localPath == null
|
||||
? SvnRepositoryContentRevision.createForRemotePath(myVcs, myRepositoryRoot, path, knownAsDirectory, revision)
|
||||
: SvnRepositoryContentRevision.create(myVcs, myRepositoryRoot, path, localPath, revision);
|
||||
}
|
||||
|
||||
public List<Change> getList() {
|
||||
|
||||
+10
-1
@@ -120,6 +120,15 @@ public class SvnRepositoryContentRevision implements ContentRevision, MarkerVcsC
|
||||
return create(vcs, SvnUtil.appendMultiParts(repositoryRoot, path), localPath, revision);
|
||||
}
|
||||
|
||||
public static SvnRepositoryContentRevision createForRemotePath(@NotNull SvnVcs vcs,
|
||||
@NotNull String repositoryRoot,
|
||||
@NotNull String path,
|
||||
boolean isDirectory,
|
||||
long revision) {
|
||||
FilePath remotePath = VcsUtil.getFilePathOnNonLocal(SvnUtil.appendMultiParts(repositoryRoot, path), isDirectory);
|
||||
return create(vcs, remotePath, remotePath, revision);
|
||||
}
|
||||
|
||||
public static SvnRepositoryContentRevision create(@NotNull SvnVcs vcs,
|
||||
@NotNull String fullPath,
|
||||
@Nullable FilePath localPath,
|
||||
@@ -127,7 +136,7 @@ public class SvnRepositoryContentRevision implements ContentRevision, MarkerVcsC
|
||||
// TODO: Check if isDirectory = false always true for this method calls
|
||||
FilePath remotePath = VcsUtil.getFilePathOnNonLocal(fullPath, false);
|
||||
|
||||
return create(vcs, remotePath, localPath, revision);
|
||||
return create(vcs, remotePath, localPath == null ? remotePath : localPath, revision);
|
||||
}
|
||||
|
||||
public static SvnRepositoryContentRevision create(@NotNull SvnVcs vcs,
|
||||
|
||||
Reference in New Issue
Block a user