use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class ElementWithBranchComparer method run.
public void run() {
new Task.Modal(myProject, getTitle(), true) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
try {
beforeCompare();
myElementUrl = resolveElementUrl();
if (myElementUrl == null) {
reportNotFound();
} else {
compare();
}
} catch (SVNCancelException ex) {
ElementWithBranchComparer.this.onCancel();
} catch (SVNException ex) {
reportException(new SvnBindException(ex));
} catch (SvnBindException ex) {
reportException(ex);
} catch (VcsException ex) {
reportGeneralException(ex);
}
}
}.queue();
showResult();
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SvnUpdateRootOptionsPanel method apply.
public void apply(final SvnConfiguration configuration) throws ConfigurationException {
final UpdateRootInfo rootInfo = configuration.getUpdateRootInfo(myRoot.getIOFile(), myVcs);
if (myUpdateToSpecificUrl.isSelected()) {
try {
rootInfo.setUrl(SvnUtil.createUrl(myURLText.getText(), false));
} catch (SvnBindException e) {
throw new ConfigurationException("Invalid url: " + myURLText.getText());
}
}
rootInfo.setUpdateToRevision(myRevisionBox.isSelected());
final SVNRevision revision = SVNRevision.parse(myRevisionText.getText());
if (!revision.isValid()) {
throw new ConfigurationException(SvnBundle.message("invalid.svn.revision.error.message", myRevisionText.getText()));
}
rootInfo.setRevision(revision);
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException 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.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class SvnUtil method getBranchForUrl.
@Nullable
public static SVNURL getBranchForUrl(@NotNull SvnVcs vcs, @NotNull VirtualFile vcsRoot, @NotNull SVNURL url) {
SVNURL result = null;
SvnBranchConfigurationNew configuration = SvnBranchConfigurationManager.getInstance(vcs.getProject()).get(vcsRoot);
try {
result = configuration.getWorkingBranch(url);
} catch (SvnBindException e) {
LOG.debug(e);
}
return result;
}
use of org.jetbrains.idea.svn.commandLine.SvnBindException in project intellij-community by JetBrains.
the class CmdVersionClient method parseVersion.
@NotNull
public static Version parseVersion(@NotNull String versionText) throws SvnBindException {
Version result = null;
Exception cause = null;
Matcher matcher = VERSION.matcher(versionText);
boolean found = matcher.find();
if (found) {
try {
result = new Version(getInt(matcher.group(1)), getInt(matcher.group(2)), getInt(matcher.group(3)));
} catch (NumberFormatException e) {
cause = e;
}
}
if (!found || cause != null) {
throw new SvnBindException(String.format("Could not parse svn version: %s", versionText), cause);
}
return result;
}
Aggregations