public void status( long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { target = target == null ? "" : target; Object[] buffer = new Object[] {"status", target, Boolean.valueOf(recursive), getRevisionObject(revision)}; try { openConnection(); write("(w(sw(n)))", buffer); authenticate(); reporter.report(this); authenticate(); read("*E", new Object[] {editor}, true); write("(w())", new Object[] {"success"}); read("[()]", null, true); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void update( SVNURL url, long revision, String target, boolean recursive, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { target = target == null ? "" : target; if (url == null) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.BAD_URL, "URL can not be NULL")); } Object[] buffer = new Object[] { "switch", getRevisionObject(revision), target, Boolean.valueOf(recursive), url.toString() }; try { openConnection(); write("(w((n)sws))", buffer); authenticate(); reporter.report(this); authenticate(); read("*E", new Object[] {editor}, true); write("(w())", new Object[] {"success"}); read("[()]", null, true); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }