void updateCredentials(String uuid, SVNURL rootURL) throws SVNException { if (getRepositoryRoot(false) != null) { return; } setRepositoryCredentials(uuid, rootURL); }
void updateCredentials(String uuid, SVNURL rootURL) throws SVNException { if (getRepositoryRoot(false) != null) { return; } setRepositoryCredentials(uuid, rootURL); }
void updateCredentials(String uuid, SVNURL rootURL) throws SVNException { if (getRepositoryRoot(false) != null) { return; } setRepositoryCredentials(uuid, rootURL); }
void updateCredentials(String uuid, SVNURL rootURL) throws SVNException { if (getRepositoryRoot(false) != null) { return; } setRepositoryCredentials(uuid, rootURL); }
private void receiveRepositoryCredentials(SVNRepositoryImpl repository) throws SVNException { if (myIsCredentialsReceived) { return; } List creds = read("s?s?l", null, true); myIsCredentialsReceived = true; if (creds != null && creds.size() >= 2 && creds.get(0) != null && creds.get(1) != null) { SVNURL rootURL = creds.get(1) != null ? SVNURL.parseURIEncoded(SVNReader.getString(creds, 1)) : null; if (rootURL != null && rootURL.toString().length() > repository.getLocation().toString().length()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Impossibly long repository root from server"), SVNLogType.NETWORK); } if (repository != null && repository.getRepositoryRoot(false) == null) { repository.updateCredentials(SVNReader.getString(creds, 0), rootURL); } if (myRealm == null) { myRealm = SVNReader.getString(creds, 0); } if (myRoot == null) { myRoot = SVNReader.getString(creds, 1); } if (creds.size() > 2 && creds.get(2) instanceof List) { List capabilities = (List) creds.get(2); addCapabilities(capabilities); } } }
private void receiveRepositoryCredentials(SVNRepositoryImpl repository) throws SVNException { if (myIsCredentialsReceived) { return; } List creds = read("s?s?l", null, true); myIsCredentialsReceived = true; if (creds != null && creds.size() >= 2 && creds.get(0) != null && creds.get(1) != null) { SVNURL rootURL = creds.get(1) != null ? SVNURL.parseURIEncoded(SVNReader.getString(creds, 1)) : null; if (rootURL != null && rootURL.toString().length() > repository.getLocation().toString().length()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Impossibly long repository root from server"), SVNLogType.NETWORK); } if (repository != null && repository.getRepositoryRoot(false) == null) { repository.updateCredentials(SVNReader.getString(creds, 0), rootURL); } if (myRealm == null) { myRealm = SVNReader.getString(creds, 0); } if (myRoot == null) { myRoot = SVNReader.getString(creds, 1); } if (creds.size() > 2 && creds.get(2) instanceof List) { List capabilities = (List) creds.get(2); addCapabilities(capabilities); } } }
private void receiveRepositoryCredentials(SVNRepositoryImpl repository) throws SVNException { if (myIsCredentialsReceived) { return; } List creds = read("s?s?l", null, true); myIsCredentialsReceived = true; if (creds != null && creds.size() >= 2 && creds.get(0) != null && creds.get(1) != null) { SVNURL rootURL = creds.get(1) != null ? SVNURL.parseURIEncoded(SVNReader.getString(creds, 1)) : null; if (rootURL != null && rootURL.toString().length() > repository.getLocation().toString().length()) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Impossibly long repository root from server"), SVNLogType.NETWORK); } if (repository != null && repository.getRepositoryRoot(false) == null) { repository.updateCredentials(SVNReader.getString(creds, 0), rootURL); } if (myRealm == null) { myRealm = SVNReader.getString(creds, 0); } if (myRoot == null) { myRoot = SVNReader.getString(creds, 1); } if (creds.size() > 2 && creds.get(2) instanceof List) { List capabilities = (List) creds.get(2); addCapabilities(capabilities); } } }
private SVNErrorMessage readAuthResponse(SVNRepositoryImpl repository) throws SVNException { Object[] items = read("(W(?S))", null, true); if (SUCCESS.equals(items[0])) { if (!myIsCredentialsReceived) { Object[] creds = read("[(?S?S)]", null, true); if (repository != null && repository.getRepositoryRoot(false) == null) { SVNURL rootURL = creds[1] != null ? SVNURL.parseURIEncoded((String) creds[1]) : null; repository.updateCredentials((String) creds[0], rootURL); } if (myRealm == null) { myRealm = (String) creds[0]; } if (myRoot == null) { myRoot = (String) creds[1]; } myIsCredentialsReceived = true; } return null; } else if (FAILURE.equals(items[0])) { return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, (String) items[1]); } return SVNErrorMessage.create(SVNErrorCode.RA_NOT_AUTHORIZED, "unexpected server response"); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton)myDirsStack.peek(); String fileToken = "c" + myNextToken++; if (copyFromPath != null) { String host = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(host, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[] { "add-file", path, parentBaton.getToken(), fileToken, copyFromPath, getRevisionObject(copyFromRevision) }); } else { myConnection.write("(w(sss()))", new Object[] { "add-file", path, parentBaton.getToken(), fileToken }); } if(myFilesToTokens == null){ myFilesToTokens = new HashMap(); } myFilesToTokens.put(path, fileToken); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fileToken = "c" + myNextToken++; if (copyFromPath != null) { String host = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(host, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken, copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken}); } if (myFilesToTokens == null) { myFilesToTokens = new SVNHashMap(); } myFilesToTokens.put(path, fileToken); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fileToken = "c" + myNextToken++; if (copyFromPath != null) { String host = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(host, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken, copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken}); } if (myFilesToTokens == null) { myFilesToTokens = new SVNHashMap(); } myFilesToTokens.put(path, fileToken); }
public void addFile(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); String fileToken = "c" + myNextToken++; if (copyFromPath != null) { String host = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(host, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken, copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-file", path, parentBaton.getToken(), fileToken}); } if (myFilesToTokens == null) { myFilesToTokens = new SVNHashMap(); } myFilesToTokens.put(path, fileToken); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton)myDirsStack.peek(); DirBaton dirBaton = new DirBaton(myNextToken++); if (copyFromPath != null) { String rootURL = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(rootURL, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[] { "add-dir", path, parentBaton.getToken(), dirBaton.getToken(), copyFromPath, getRevisionObject(copyFromRevision) }); } else { myConnection.write("(w(sss()))", new Object[] { "add-dir", path, parentBaton.getToken(), dirBaton.getToken() }); } myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); DirBaton dirBaton = new DirBaton(myNextToken++); if (copyFromPath != null) { String rootURL = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(rootURL, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken(), copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken()}); } myDirsStack.push(dirBaton); }
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); DirBaton dirBaton = new DirBaton(myNextToken++); if (copyFromPath != null) { String rootURL = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(rootURL, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken(), copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken()}); } myDirsStack.push(dirBaton); }
SVNURL repositoryRoot = getRepositoryRoot(false); List dirents = (List) values.get(2); for (Iterator iterator = dirents.iterator(); iterator.hasNext();) {
public void addDir(String path, String copyFromPath, long copyFromRevision) throws SVNException { DirBaton parentBaton = (DirBaton) myDirsStack.peek(); DirBaton dirBaton = new DirBaton(myNextToken++); if (copyFromPath != null) { if (!SVNRevision.isValidRevisionNumber(copyFromRevision)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.RA_SVN_MALFORMED_DATA, "Got source path but no source revision for ''{0}''", path); SVNErrorManager.error(err, SVNLogType.NETWORK); } String rootURL = myRepository.getRepositoryRoot(false).toString(); copyFromPath = SVNPathUtil.append(rootURL, SVNEncodingUtil.uriEncode(myRepository.getRepositoryPath(copyFromPath))); myConnection.write("(w(sss(sn)))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken(), copyFromPath, getRevisionObject(copyFromRevision)}); } else { myConnection.write("(w(sss()))", new Object[]{"add-dir", path, parentBaton.getToken(), dirBaton.getToken()}); } myDirsStack.push(dirBaton); }
SVNURL repositoryRoot = getRepositoryRoot(false); List values = SVNReader.parseTuple("wnsr(?s)(?s)", items, null); SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(values, 0));
SVNURL repositoryRoot = getRepositoryRoot(false); List values = SVNReader.parseTuple("wnsr(?s)(?s)", items, null); SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(values, 0));
SVNURL repositoryRoot = getRepositoryRoot(false); List values = SVNReader.parseTuple("wnsr(?s)(?s)", items, null); SVNNodeKind kind = SVNNodeKind.parseKind(SVNReader.getString(values, 0));