private SVNPath getParentPath(SVNPath target) { return new SVNPath(SVNPathUtil.removeTail(target.getTarget()), target.getPegRevision()); }
private SVNPath getParentPath(SVNPath target) { return new SVNPath(SVNPathUtil.removeTail(target.getTarget()), target.getPegRevision()); }
protected File getLocalRepository(int index) throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.isEmpty()) { targets.add(""); } if (targets.isEmpty() || index > targets.size() - 1 ) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Repository argument required"), SVNLogType.CLIENT); } SVNPath target = new SVNPath((String) targets.get(index)); if (target.isURL()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "'" + target.getTarget() + "' is an URL when it should be a path"), SVNLogType.CLIENT); } return target.getFile(); }
protected File getLocalRepository(int index) throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.isEmpty()) { targets.add(""); } if (targets.isEmpty() || index > targets.size() - 1 ) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Repository argument required"), SVNLogType.CLIENT); } SVNPath target = new SVNPath((String) targets.get(index)); if (target.isURL()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "'" + target.getTarget() + "' is an URL when it should be a path"), SVNLogType.CLIENT); } return target.getFile(); }
String repoPath = repo.getLocation().toDecodedString().substring(repoRoot.length()); SVNPath path = new SVNPath(repoPath, true, true); SVNNodeKind svnNodeKind = repo.checkPath(path.getTarget(), path.getPegRevision().getNumber()); if (svnNodeKind != SVNNodeKind.DIR) { return FormValidation.error("Credentials looks fine but the repository URL is invalid");
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath fromURL = new SVNPath((String) targets.get(1)); if (!fromURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", fromURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); client.setEventHandler(this); client.doInitialize(fromURL.getURL(), toURL.getURL()); }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 2) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath fromURL = new SVNPath((String) targets.get(1)); if (!fromURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", fromURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); client.setEventHandler(this); client.doInitialize(fromURL.getURL(), toURL.getURL()); }
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "''{0}'' is URL when it should be a path", path.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT);
SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "''{0}'' is URL when it should be a path", path.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT);
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); client.setEventHandler(this); client.setReplayHandler(new ISVNLogEntryHandler() { public void handleLogEntry(SVNLogEntry logEntry) throws SVNException { getEnvironment().getOut().println("Committed revision " + logEntry.getRevision() + "."); } }); client.doSynchronize(toURL.getURL()); }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); client.setEventHandler(this); client.setReplayHandler(new ISVNLogEntryHandler() { public void handleLogEntry(SVNLogEntry logEntry) throws SVNException { getEnvironment().getOut().println("Committed revision " + logEntry.getRevision() + "."); } }); client.doSynchronize(toURL.getURL()); }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); SVNSyncInfo info = client.doInfo(toURL.getURL()); getSVNSyncEnvironment().getOut().println("Source URL: " + info.getSrcURL()); if (info.getSourceRepositoryUUID() != null) { getSVNSyncEnvironment().getOut().println("Source Repository UUID: " + info.getSourceRepositoryUUID()); } if (SVNRevision.isValidRevisionNumber(info.getLastMergedRevision())) { getSVNSyncEnvironment().getOut().println("Last Merged Revision: " + info.getLastMergedRevision()); } }
public void run() throws SVNException { List targets = getEnvironment().combineTargets(null, false); if (targets.size() < 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_INSUFFICIENT_ARGS); SVNErrorManager.error(err, SVNLogType.CLIENT); } if (targets.size() > 1) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNPath toURL = new SVNPath((String) targets.get(0)); if (!toURL.isURL()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.CL_ARG_PARSING_ERROR, "Path ''{0}'' is not a URL", toURL.getTarget()); SVNErrorManager.error(err, SVNLogType.CLIENT); } SVNAdminClient client = getEnvironment().getClientManager().getAdminClient(); SVNSyncInfo info = client.doInfo(toURL.getURL()); getSVNSyncEnvironment().getOut().println("Source URL: " + info.getSrcURL()); if (info.getSourceRepositoryUUID() != null) { getSVNSyncEnvironment().getOut().println("Source Repository UUID: " + info.getSourceRepositoryUUID()); } if (SVNRevision.isValidRevisionNumber(info.getLastMergedRevision())) { getSVNSyncEnvironment().getOut().println("Last Merged Revision: " + info.getLastMergedRevision()); } }
SVNPath target = new SVNPath((String) targets.get(i)); if (target.isFile()) { if ("".equals(target.getTarget())) { if (isScheduledForAddition(target.getFile())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_INVALID_OP_ON_CWD,
SVNPath target = new SVNPath((String) targets.get(i)); if (target.isFile()) { if ("".equals(target.getTarget())) { if (isScheduledForAddition(target.getFile())) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_INVALID_OP_ON_CWD,
"Invalid URL ''{0}''", url.getTarget()), SVNLogType.CLIENT);
"Invalid URL ''{0}''", url.getTarget()), SVNLogType.CLIENT);
String to; if (targets.size() == 1) { to = SVNPathUtil.tail(from.getTarget()); if (from.isURL()) { to = SVNEncodingUtil.uriDecode(to);