public void replay(long lowRevision, long highRevision, boolean sendDeltas, ISVNEditor editor) throws SVNException { Object[] buffer = new Object[] { "replay", getRevisionObject(highRevision), getRevisionObject(lowRevision), Boolean.valueOf(sendDeltas) }; try { openConnection(); write("(w(nnw))", buffer); authenticate(); read("*E", new Object[] { editor }, true); // write("(w())", new Object[] {"success"}); read("[()]", null, true); } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the replay command"); } finally { closeConnection(); } }
public long getLatestRevision() throws SVNException { Object[] buffer = new Object[] { "get-latest-rev" }; try { openConnection(); write("(w())", buffer); authenticate(); buffer = read("[(N)]", buffer, true); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } return SVNReader.getLong(buffer, 0); }
public long getLatestRevision() throws SVNException { Object[] buffer = new Object[]{"get-latest-rev"}; List values = null; try { openConnection(); write("(w())", buffer); authenticate(); values = read("r", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } return SVNReader.getLong(values, 0); }
public SVNLock getLock(String path) throws SVNException { try { openConnection(); path = getLocationRelativePath(path); Object[] buffer = new Object[]{"get-lock", path}; write("(w(s))", buffer); authenticate(); List items = read("(?l)", null, false); items = (List) items.get(0); return SVNReader.getLock(items); } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the get-lock command"); } finally { closeConnection(); } return null; }
public long getLatestRevision() throws SVNException { Object[] buffer = new Object[]{"get-latest-rev"}; List values = null; try { openConnection(); write("(w())", buffer); authenticate(); values = read("r", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } return SVNReader.getLong(values, 0); }
public long getLatestRevision() throws SVNException { Object[] buffer = new Object[]{"get-latest-rev"}; List values = null; try { openConnection(); write("(w())", buffer); authenticate(); values = read("r", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } return SVNReader.getLong(values, 0); }
public void replay(long lowRevision, long highRevision, boolean sendDeltas, ISVNEditor editor) throws SVNException { Object[] buffer = new Object[]{"replay", getRevisionObject(highRevision), getRevisionObject(lowRevision), Boolean.valueOf(sendDeltas)}; try { openConnection(); write("(w(nnw))", buffer); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, true); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the replay command"); } finally { closeConnection(); } }
public void replay(long lowRevision, long highRevision, boolean sendDeltas, ISVNEditor editor) throws SVNException { Object[] buffer = new Object[]{"replay", getRevisionObject(highRevision), getRevisionObject(lowRevision), Boolean.valueOf(sendDeltas)}; try { openConnection(); write("(w(nnw))", buffer); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, true); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the replay command"); } finally { closeConnection(); } }
public void replay(long lowRevision, long highRevision, boolean sendDeltas, ISVNEditor editor) throws SVNException { Object[] buffer = new Object[]{"replay", getRevisionObject(highRevision), getRevisionObject(lowRevision), Boolean.valueOf(sendDeltas)}; try { openConnection(); write("(w(nnw))", buffer); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, true); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the replay command"); } finally { closeConnection(); } }
public void setRevisionPropertyValue(long revision, String propertyName, String propertyValue) throws SVNException { assertValidRevision(revision); Object[] buffer = new Object[] { "change-rev-prop", getRevisionObject(revision), propertyName, propertyValue }; try { openConnection(); write("(w(nss))", buffer); authenticate(); read("[()]", buffer, true); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public SVNLock getLock(String path) throws SVNException { try { openConnection(); path = getRepositoryPath(path); Object[] buffer = new Object[] { "get-lock", path }; write("(w(s))", buffer); authenticate(); read("[((?L))]", buffer, true); return (SVNLock) buffer[0]; } catch (SVNException e) { closeSession(); handleUnsupportedCommand(e, "Server doesn't support the get-lock command"); } finally { closeConnection(); } return null; }
public String getRevisionPropertyValue(long revision, String propertyName) throws SVNException { assertValidRevision(revision); Object[] buffer = new Object[] { "rev-prop", getRevisionObject(revision), propertyName }; try { openConnection(); write("(w(ns))", buffer); authenticate(); buffer = read("[((?S))]", buffer, true); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } return (String) buffer[0]; }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openConnection(); path = getRepositoryPath(path); Object[] buffer = new Object[] { "check-path", path, getRevisionObject(revision) }; write("(w(s(n)))", buffer); authenticate(); read("[(W)]", buffer, true); return SVNNodeKind.parseKind((String) buffer[0]); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void setRevisionPropertyValue(long revision, String propertyName, SVNPropertyValue propertyValue) throws SVNException { assertValidRevision(revision); byte[] bytes = SVNPropertyValue.getPropertyAsBytes(propertyValue); Object[] buffer = new Object[]{"change-rev-prop", getRevisionObject(revision), propertyName, bytes}; try { openConnection(); write("(w(nsb))", buffer); authenticate(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void setRevisionPropertyValue(long revision, String propertyName, SVNPropertyValue propertyValue) throws SVNException { assertValidRevision(revision); byte[] bytes = SVNPropertyValue.getPropertyAsBytes(propertyValue); Object[] buffer = new Object[]{"change-rev-prop", getRevisionObject(revision), propertyName, bytes}; try { openConnection(); write("(w(nsb))", buffer); authenticate(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void setRevisionPropertyValue(long revision, String propertyName, SVNPropertyValue propertyValue) throws SVNException { assertValidRevision(revision); byte[] bytes = SVNPropertyValue.getPropertyAsBytes(propertyValue); Object[] buffer = new Object[]{"change-rev-prop", getRevisionObject(revision), propertyName, bytes}; try { openConnection(); write("(w(nsb))", buffer); authenticate(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openConnection(); path = getLocationRelativePath(path); Object[] buffer = new Object[]{"check-path", path, getRevisionObject(revision)}; write("(w(s(n)))", buffer); authenticate(); List values = read("w", null, false); return SVNNodeKind.parseKind(SVNReader.getString(values, 0)); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openConnection(); path = getRepositoryPath(path); Object[] buffer = new Object[]{"check-path", path, getRevisionObject(revision)}; write("(w(s(n)))", buffer); authenticate(); List values = read("w", null, false); return SVNNodeKind.parseKind(SVNReader.getString(values, 0)); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public SVNNodeKind checkPath(String path, long revision) throws SVNException { try { openConnection(); path = getRepositoryPath(path); Object[] buffer = new Object[]{"check-path", path, getRevisionObject(revision)}; write("(w(s(n)))", buffer); authenticate(); List values = read("w", null, false); return SVNNodeKind.parseKind(SVNReader.getString(values, 0)); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public SVNPropertyValue getRevisionPropertyValue(long revision, String propertyName) throws SVNException { assertValidRevision(revision); Object[] buffer = new Object[]{"rev-prop", getRevisionObject(revision), propertyName}; List values = null; try { openConnection(); write("(w(ns))", buffer); authenticate(); values = read("(?b)", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } byte[] bytes = SVNReader.getBytes(values, 0); return bytes == null ? null : SVNPropertyValue.create(propertyName, bytes); }