public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { Map attrs = new SVNHashMap(); attrs.put(REVISION_ATTR, String.valueOf(revision)); attrs.put("depth", SVNDepth.asString(depth)); if (lockToken != null) { if (lockTokens != null) { lockTokens.put(path, lockToken); } attrs.put("lock-token", lockToken); } if (startEmpty) { attrs.put("start-empty", Boolean.TRUE.toString()); } SVNXMLUtil.openCDataTag(SVNXMLUtil.SVN_NAMESPACE_PREFIX, "entry", path, attrs, report); }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { Map attrs = new SVNHashMap(); attrs.put(REVISION_ATTR, String.valueOf(revision)); attrs.put("depth", SVNDepth.asString(depth)); if (lockToken != null) { if (lockTokens != null) { lockTokens.put(path, lockToken); } attrs.put("lock-token", lockToken); } if (startEmpty) { attrs.put("start-empty", Boolean.TRUE.toString()); } SVNXMLUtil.openCDataTag(SVNXMLUtil.SVN_NAMESPACE_PREFIX, "entry", path, attrs, report); }
public void setPath(String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { Map attrs = new SVNHashMap(); attrs.put(REVISION_ATTR, String.valueOf(revision)); attrs.put("depth", SVNDepth.asString(depth)); if (lockToken != null) { if (lockTokens != null) { lockTokens.put(path, lockToken); } attrs.put("lock-token", lockToken); } if (startEmpty) { attrs.put("start-empty", Boolean.TRUE.toString()); } SVNXMLUtil.openCDataTag(SVNXMLUtil.SVN_NAMESPACE_PREFIX, "entry", path, attrs, report); }
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 { Map attrs = new SVNHashMap(); attrs.put(REVISION_ATTR, String.valueOf(revision)); attrs.put("depth", SVNDepth.asString(depth)); if (lockToken != null) { if (lockTokens != null) { lockTokens.put(path, lockToken); } attrs.put("lock-token", lockToken); } if (startEmpty) { attrs.put("start-empty", Boolean.TRUE.toString()); } String linkedPath = url.getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, null, linkedPath, revision, false, false, null); linkedPath = SVNEncodingUtil.uriDecode(info.baselinePath); if (!linkedPath.startsWith("/")) { linkedPath = "/" + linkedPath; } attrs.put("linkpath", linkedPath); SVNXMLUtil.openCDataTag(SVNXMLUtil.SVN_NAMESPACE_PREFIX, "entry", path, attrs, report); }
public String getDepthLetter(SVNDepth depth) throws SVNException { if (depth == SVNDepth.EXCLUDE) { return "X"; } if (depth == SVNDepth.EMPTY) { return "E"; } if (depth == SVNDepth.FILES) { return "F"; } if (depth == SVNDepth.IMMEDIATES) { return "M"; } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", SVNDepth.asString(depth)); SVNErrorManager.error(err, SVNLogType.FSFS); return null; } }
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 String getDepthLetter(SVNDepth depth) throws SVNException { if (depth == SVNDepth.EXCLUDE) { return "X"; } if (depth == SVNDepth.EMPTY) { return "E"; } if (depth == SVNDepth.FILES) { return "F"; } if (depth == SVNDepth.IMMEDIATES) { return "M"; } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", SVNDepth.asString(depth)); SVNErrorManager.error(err, SVNLogType.FSFS); return null; } }
public void linkPath(SVNURL url, String path, String lockToken, long revision, SVNDepth depth, boolean startEmpty) throws SVNException { Map attrs = new SVNHashMap(); attrs.put(REVISION_ATTR, String.valueOf(revision)); attrs.put("depth", SVNDepth.asString(depth)); if (lockToken != null) { if (lockTokens != null) { lockTokens.put(path, lockToken); } attrs.put("lock-token", lockToken); } if (startEmpty) { attrs.put("start-empty", Boolean.TRUE.toString()); } String linkedPath = url.getURIEncodedPath(); DAVBaselineInfo info = DAVUtil.getBaselineInfo(connection, null, linkedPath, revision, false, false, null); linkedPath = SVNEncodingUtil.uriDecode(info.baselinePath); if (!linkedPath.startsWith("/")) { linkedPath = "/" + linkedPath; } attrs.put("linkpath", linkedPath); SVNXMLUtil.openCDataTag(SVNXMLUtil.SVN_NAMESPACE_PREFIX, "entry", path, attrs, report); }
public String getDepthLetter(SVNDepth depth) throws SVNException { if (depth == SVNDepth.EXCLUDE) { return "X"; } if (depth == SVNDepth.EMPTY) { return "E"; } if (depth == SVNDepth.FILES) { return "F"; } if (depth == SVNDepth.IMMEDIATES) { return "M"; } SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", SVNDepth.asString(depth)); SVNErrorManager.error(err, SVNLogType.FSFS); return null; } }
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 update(long revision, String target, SVNDepth depth, boolean sendCopyFromArgs, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { boolean hasTarget = target != null; target = target == null ? "" : target; boolean recursive = getRecurseFromDepth(depth); editor = getDepthFilterEditor(editor, depth, hasTarget); Object[] buffer = new Object[]{"update", getRevisionObject(revision), target, Boolean.valueOf(recursive), SVNDepth.asString(depth), Boolean.valueOf(sendCopyFromArgs)}; try { openConnection(); write("(w((n)swww))", buffer); authenticate(); reporter.report(this); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, false); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void status(long revision, String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { boolean recursive = getRecurseFromDepth(depth); boolean hasTarget = target != null; target = target == null ? "" : target; editor = getDepthFilterEditor(editor, depth, hasTarget); Object[] buffer = new Object[]{"status", target, Boolean.valueOf(recursive), getRevisionObject(revision), SVNDepth.asString(depth)}; try { openConnection(); write("(w(sw(n)w))", buffer); authenticate(); reporter.report(this); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, false); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void status(long revision, String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { boolean recursive = getRecurseFromDepth(depth); boolean hasTarget = target != null; target = target == null ? "" : target; editor = getDepthFilterEditor(editor, depth, hasTarget); Object[] buffer = new Object[]{"status", target, Boolean.valueOf(recursive), getRevisionObject(revision), SVNDepth.asString(depth)}; try { openConnection(); write("(w(sw(n)w))", buffer); authenticate(); reporter.report(this); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, false); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
private void updateDepthValues(File localAbspath, SVNWCDbDir pdh, File localRelpath, SVNDepth depth) throws SVNException { pdh.flushEntries(localAbspath); SVNSqlJetStatement stmt = pdh.getWCRoot().getSDb().getStatement(SVNWCDbStatements.UPDATE_NODE_BASE_DEPTH); long affectedRows; try { stmt.bindf("iss", pdh.getWCRoot().getWcId(), localRelpath, SVNDepth.asString(depth)); affectedRows = stmt.done(); } finally { stmt.reset(); } if (affectedRows == 0) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.WC_PATH_NOT_FOUND, "The node ''{0}'' os not a committed directory", localAbspath); SVNErrorManager.error(err, SVNLogType.WC); } }
public void status(long revision, String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { boolean recursive = getRecurseFromDepth(depth); boolean hasTarget = target != null; target = target == null ? "" : target; editor = getDepthFilterEditor(editor, depth, hasTarget); Object[] buffer = new Object[]{"status", target, Boolean.valueOf(recursive), getRevisionObject(revision), SVNDepth.asString(depth)}; try { openConnection(); write("(w(sw(n)w))", buffer); authenticate(); reporter.report(this); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, false); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }
public void update(SVNURL url, long revision, String target, SVNDepth depth, ISVNReporterBaton reporter, ISVNEditor editor) throws SVNException { boolean recursive = getRecurseFromDepth(depth); boolean hasTarget = target != null; target = target == null ? "" : target; if (url == null) { SVNErrorManager.error(SVNErrorMessage.create(SVNErrorCode.BAD_URL, "URL can not be NULL"), SVNLogType.NETWORK); } editor = getDepthFilterEditor(editor, depth, hasTarget); Object[] buffer = new Object[]{"switch", getRevisionObject(revision), target, Boolean.valueOf(recursive), url.toString(), SVNDepth.asString(depth)}; try { openConnection(); write("(w((n)swsw))", buffer); authenticate(); reporter.report(this); authenticate(); SVNEditModeReader editReader = new SVNEditModeReader(myConnection, editor, false); editReader.driveEditor(); read("", null, false); } catch (SVNException e) { closeSession(); throw e; } finally { closeConnection(); } }