public void setPath(String path, String lockToken, long revision, boolean startEmpty) throws SVNException { assertValidRevision(revision); if (lockToken == null) { write("(w(snw))", new Object[] { "set-path", path, getRevisionObject(revision), Boolean.valueOf(startEmpty) }); } else { write("(w(snw(s)))", new Object[] { "set-path", path, getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken }); } }
public void linkPath(SVNURL url, String path, String lockToken, long revison, boolean startEmpty) throws SVNException { assertValidRevision(revison); if (lockToken == null) { write("(w(ssnw))", new Object[] { "link-path", path, url.toString(), getRevisionObject(revison), Boolean.valueOf(startEmpty) }); } else { write("(w(ssnw(s)))", new Object[] { "link-path", path, url.toString(), getRevisionObject(revison), Boolean.valueOf(startEmpty), lockToken }); } }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(snw(s)w))", new Object[]{"set-path", path, getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(snw(s)w))", new Object[]{"set-path", path, getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(snw(s)w))", new Object[]{"set-path", path, getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(ssnw(s)w))", new Object[]{"link-path", path, url.toString(), getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(ssnw(s)w))", new Object[]{"link-path", path, url.toString(), getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { assertValidRevision(revision); write("(w(ssnw(s)w))", new Object[]{"link-path", path, url.toString(), getRevisionObject(revision), Boolean.valueOf(startEmpty), lockToken, SVNDepth.asString(depth)}); }
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 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 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); }