path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path);
path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path);
path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path);
path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path);
public void testConnection() throws SVNException { String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); repository.setAuthenticationManager(authManager); repository.testConnection(); }
String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); SVNURL fileUrl = SVNURL.parseURIEncoded(encodedUrl); SVNRevision svnRev1 = SVNRevision.create(rev1);
@Override public String getRepositoryId() { String repositoryUUID; try { String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); ISVNAuthenticationManager svnAuthManager = SVNWCUtil.createDefaultAuthenticationManager(); repository.setAuthenticationManager(svnAuthManager); repositoryUUID = repository.getRepositoryUUID(true); } catch (SVNException e) { if (log.isDebugEnabled()) { log.debug("Can't get UUID", e); } return null; } return repositoryUUID; }
public String getSvnRoot(String username, String password) { String repositoryRoot; try { String encodedUrl = SVNEncodingUtil.autoURIEncode(addressSvn); SVNRepository repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(encodedUrl)); ISVNAuthenticationManager svnAuthManager = SVNWCUtil.createDefaultAuthenticationManager(username, password); repository.setAuthenticationManager(svnAuthManager); repositoryRoot = repository.getRepositoryRoot(true).toString(); } catch (SVNException e) { if (log.isDebugEnabled()) { log.debug("Can't get SvnRoot for address " + addressSvn, e); } return null; } return repositoryRoot; }
} else { if (SVNCommandUtil.isURL(path)) { path = SVNEncodingUtil.autoURIEncode(path); try { SVNEncodingUtil.assertURISafe(path);
myEncodedPath = SVNEncodingUtil.autoURIEncode(myPath); SVNEncodingUtil.assertURISafe(myEncodedPath); myPath = SVNEncodingUtil.uriDecode(myEncodedPath); if (uriEncoded) { myEncodedPath = SVNEncodingUtil.autoURIEncode(httpPath); SVNEncodingUtil.assertURISafe(myEncodedPath); myPath = SVNEncodingUtil.uriDecode(myEncodedPath);
@Override public void switchToVersion(String version) throws Exception { Log.logInfoRB("SVN_START", "checkout to " + version); filesForCommit.clear(); SVNURL url = SVNURL.parseURIEncoded(SVNEncodingUtil.autoURIEncode(config.getUrl())); SVNRevision toRev; if (version != null) { toRev = SVNRevision.create(Long.parseLong(version)); } else { toRev = SVNRevision.HEAD; } try { ourClientManager.getUpdateClient().doCheckout(url, baseDirectory, SVNRevision.HEAD, toRev, SVNDepth.INFINITY, false); Log.logInfoRB("SVN_FINISH", "checkout"); } catch (Exception ex) { Log.logErrorRB("SVN_ERROR", "checkout", ex.getMessage()); checkNetworkException(ex); throw ex; } }
/** * Creates a new <b>SVNURL</b> object replacing a path component of * this object with a new provided one. * * @param path a path component * @param uriEncoded <span class="javakeyword">true</span> if <code>path</code> * is UTF-8 encoded * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL setPath(String path, boolean uriEncoded) throws SVNException { if (path == null || "".equals(path)) { path = "/"; } if (!uriEncoded) { path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Creates a new <b>SVNURL</b> object replacing a path component of * this object with a new provided one. * * @param path a path component * @param uriEncoded <span class="javakeyword">true</span> if <code>path</code> * is UTF-8 encoded * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL setPath(String path, boolean uriEncoded) throws SVNException { if (path == null || "".equals(path)) { path = "/"; } if (!uriEncoded) { path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Creates a new <b>SVNURL</b> object replacing a path component of * this object with a new provided one. * * @param path a path component * @param uriEncoded <span class="javakeyword">true</span> if <code>path</code> * is UTF-8 encoded * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL setPath(String path, boolean uriEncoded) throws SVNException { if (path == null || "".equals(path)) { path = "/"; } if (!uriEncoded) { path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Creates a new <b>SVNURL</b> object replacing a path component of * this object with a new provided one. * * @param path a path component * @param uriEncoded <span class="javakeyword">true</span> if <code>path</code> * is UTF-8 encoded * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL setPath(String path, boolean uriEncoded) throws SVNException { if (path == null || "".equals(path)) { path = "/"; } if (!uriEncoded) { path = SVNEncodingUtil.uriEncode(path); } else { path = SVNEncodingUtil.autoURIEncode(path); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Constructs a new <b>SVNURL</b> representation appending a new path * segment to the path component of this representation. * * @param segment a new path segment * @param uriEncoded <span class="javakeyword">true</span> if * <code>segment</code> is UTF-8 encoded, * <span class="javakeyword">false</span> * otherwise * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL appendPath(String segment, boolean uriEncoded) throws SVNException { if (segment == null || "".equals(segment)) { return this; } if (!uriEncoded) { segment = SVNEncodingUtil.uriEncode(segment); } else { segment = SVNEncodingUtil.autoURIEncode(segment); } String path = getURIEncodedPath(); if ("".equals(path)) { path = "/" + segment; } else { path = SVNPathUtil.append(path, segment); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Constructs a new <b>SVNURL</b> representation appending a new path * segment to the path component of this representation. * * @param segment a new path segment * @param uriEncoded <span class="javakeyword">true</span> if * <code>segment</code> is UTF-8 encoded, * <span class="javakeyword">false</span> * otherwise * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL appendPath(String segment, boolean uriEncoded) throws SVNException { if (segment == null || "".equals(segment)) { return this; } if (!uriEncoded) { segment = SVNEncodingUtil.uriEncode(segment); } else { segment = SVNEncodingUtil.autoURIEncode(segment); } String path = getURIEncodedPath(); if ("".equals(path)) { path = "/" + segment; } else { path = SVNPathUtil.append(path, segment); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
/** * Constructs a new <b>SVNURL</b> representation appending a new path * segment to the path component of this representation. * * @param segment a new path segment * @param uriEncoded <span class="javakeyword">true</span> if * <code>segment</code> is UTF-8 encoded, * <span class="javakeyword">false</span> * otherwise * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL appendPath(String segment, boolean uriEncoded) throws SVNException { if (segment == null || "".equals(segment)) { return this; } if (!uriEncoded) { segment = SVNEncodingUtil.uriEncode(segment); } else { segment = SVNEncodingUtil.autoURIEncode(segment); } String path = getURIEncodedPath(); if ("".equals(path)) { path = "/" + segment; } else { path = SVNPathUtil.append(path, segment); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }
(ISVNAuthenticationManager) null); ourClientManager.getWCClient().doInfo(SVNURL.parseURIEncoded(SVNEncodingUtil.autoURIEncode(url)), SVNRevision.HEAD, SVNRevision.HEAD);
/** * Constructs a new <b>SVNURL</b> representation appending a new path * segment to the path component of this representation. * * @param segment a new path segment * @param uriEncoded <span class="javakeyword">true</span> if * <code>segment</code> is UTF-8 encoded, * <span class="javakeyword">false</span> * otherwise * @return a new <b>SVNURL</b> representation * @throws SVNException if a parse error occurred */ public SVNURL appendPath(String segment, boolean uriEncoded) throws SVNException { if (segment == null || "".equals(segment)) { return this; } if (!uriEncoded) { segment = SVNEncodingUtil.uriEncode(segment); } else { segment = SVNEncodingUtil.autoURIEncode(segment); } String path = getURIEncodedPath(); if ("".equals(path)) { path = "/" + segment; } else { path = SVNPathUtil.append(path, segment); } String url = composeURL(getProtocol(), getUserInfo(), getHost(), myIsDefaultPort ? -1 : getPort(), path); return parseURIEncoded(url); }