use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SvnFileSystemListener method for17move.
private boolean for17move(final SvnVcs vcs, final File src, final File dst, boolean undo, Status srcStatus) throws VcsException {
if (srcStatus != null && srcStatus.getCopyFromURL() == null) {
undo = false;
}
if (undo) {
myUndoingMove = true;
createRevertAction(vcs, dst, true).execute();
copyUnversionedMembersOfDirectory(src, dst);
if (isUnversioned(srcStatus)) {
FileUtil.delete(src);
} else {
createRevertAction(vcs, src, true).execute();
}
restoreFromUndoStorage(dst);
} else {
if (doUsualMove(vcs, src))
return true;
// check destination directory
if (isUnversioned(vcs, dst.getParentFile())) {
try {
FileUtil.copyFileOrDir(src, dst);
} catch (IOException e) {
throw new SvnBindException(e);
}
createDeleteAction(vcs, src, true).execute();
return false;
}
moveFileWithSvn(vcs, src, dst);
}
return false;
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class MarkResolvedAction method collectResolvablePaths.
@NotNull
private static Collection<String> collectResolvablePaths(@NotNull SvnVcs vcs, @NotNull VirtualFile[] files) {
Collection<String> result = newTreeSet();
for (VirtualFile file : files) {
try {
File path = VfsUtilCore.virtualToIoFile(file);
StatusClient client = vcs.getFactory(path).createStatusClient();
client.doStatus(path, SVNRevision.UNDEFINED, Depth.INFINITY, false, false, false, false, status -> {
if (status.getContentsStatus() == StatusType.STATUS_CONFLICTED || status.getPropertiesStatus() == StatusType.STATUS_CONFLICTED) {
result.add(status.getFile().getAbsolutePath());
}
}, null);
} catch (SvnBindException e) {
LOG.warn(e);
}
}
return result;
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SvnKitUpgradeClient method upgrade.
@Override
public void upgrade(@NotNull File path, @NotNull WorkingCopyFormat format, @Nullable ProgressTracker handler) throws VcsException {
validateFormat(format, getSupportedFormats());
SVNWCClient client = myVcs.getSvnKitManager().createUpgradeClient();
client.setEventHandler(toEventHandler(handler));
try {
cleanupIfNecessary(path, format, client, handler);
upgrade(path, format, client, handler);
} catch (SVNException e) {
throw new SvnBindException(e);
}
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SelectLocationDialog method openDialog.
@Nullable
private static SelectLocationDialog openDialog(Project project, String url, String dstLabel, String dstName, boolean showFiles, boolean allowActions, String errorMessage) {
try {
SVNURL svnUrl = SvnUtil.createUrl(url);
final SVNURL repositoryUrl = initRoot(project, svnUrl);
if (repositoryUrl == null) {
Messages.showErrorDialog(project, "Can not detect repository root for URL: " + url, SvnBundle.message("dialog.title.select.repository.location"));
return null;
}
SelectLocationDialog dialog = new SelectLocationDialog(project, repositoryUrl, dstLabel, dstName, showFiles, allowActions);
dialog.show();
return dialog;
} catch (SvnBindException e) {
Messages.showErrorDialog(project, errorMessage != null ? errorMessage : e.getMessage(), SvnBundle.message("dialog.title.select.repository.location"));
return null;
}
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SvnKitDiffClient method unifiedDiff.
@Override
public void unifiedDiff(@NotNull SvnTarget target1, @NotNull SvnTarget target2, @NotNull OutputStream output) throws VcsException {
assertUrl(target1);
assertUrl(target2);
try {
myVcs.getSvnKitManager().createDiffClient().doDiff(target1.getURL(), target1.getPegRevision(), target2.getURL(), target2.getPegRevision(), true, false, output);
} catch (SVNException e) {
throw new SvnBindException(e);
}
}
Aggregations