use of org.jetbrains.idea.svn.update.UpdateClient in project intellij-community by JetBrains.
the class CreateExternalAction method doInBackground.
private static void doInBackground(@NotNull Project project, @NotNull VirtualFile file, String url, boolean checkout, String target) {
SvnVcs vcs = SvnVcs.getInstance(project);
VcsDirtyScopeManager dirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
File ioFile = virtualToIoFile(file);
try {
addToExternalProperty(vcs, ioFile, target, url);
dirtyScopeManager.fileDirty(file);
if (checkout) {
UpdateClient client = vcs.getFactory(ioFile).createUpdateClient();
client.setEventHandler(new SvnProgressCanceller());
client.doUpdate(ioFile, SVNRevision.HEAD, Depth.UNKNOWN, false, false);
file.refresh(true, true, () -> dirtyScopeManager.dirDirtyRecursively(file));
}
} catch (VcsException e) {
AbstractVcsHelper.getInstance(project).showError(e, "Create External");
}
}
Aggregations