/** * Returns a string representation of this object. * * @return string representation of this object */ public String toString() { return getName(); }
/** * @param file * @param revision * @param recursive * @param force * @return actual revision number * @throws SVNException * @deprecated use {@link #doUpdate(File, SVNRevision, SVNDepth, boolean, boolean)} instead */ public long doUpdate(File file, SVNRevision revision, boolean recursive, boolean force) throws SVNException { return doUpdate(file, revision, SVNDepth.fromRecurse(recursive), force, false); }
public static SVNDepth parseDepth(String depthStr) { SVNDepth d = null; if (depthStr != null) { d = SVNDepth.fromString(depthStr); } if (d == null) { d = SVNDepth.UNKNOWN; } return d; }
assertNullCData(element, property); String value = property.getFirstValue(true); setDepth(SVNDepth.fromString(value)); setDepthRequested(true); } else if (element == SEND_COPYFROM_ARGS) { assertNullCData(element, property); String value = property.getFirstValue(true); setDepth(SVNDepth.fromRecurse(!"no".equals(value))); setRecursiveRequested(true); } else if (element == IGNORE_ANCESTRY) {
/** * Says whether this object and <code>obj</code> are equal. * * @param obj another object to compare with * @return <span class="javakeyword">true</span> if equal; otherwise <span class="javakeyword">false</span> */ public boolean equals(Object obj) { return compareTo(obj) == 0; }
SVNErrorManager.error(err, SVNLogType.WC); if (depthIsSticky && depth.compareTo(SVNDepth.INFINITY) < 0) { SVNEntry targetEntry = anchorArea.getEntry(info.getTargetName(), true); if (targetEntry != null && targetEntry.isDirectory()) { repository.update(url, revNumber, target, depth, reporter, SVNCancellableEditor.newInstance(filterEditor, this, getDebugLog())); long targetRevision = editor.getTargetRevision(); if (targetRevision >= 0 && !isIgnoreExternals() && depth.isRecursive()) { url = target == null ? url : url.removePathTail(); handleExternals(wcAccess, info.getAnchor().getRoot(), info.getOldExternals(), info.getNewExternals(), info.getDepths(), url, sourceRoot, depth, false, true);
public long commit(String[] path, String message, int depth, boolean noUnlock, boolean keepChangelist, String[] changelists, Map revprops) throws ClientException { if (path == null || path.length == 0) { return 0; } SVNCommitClient client = getSVNCommitClient(); File[] files = new File[path.length]; for (int i = 0; i < path.length; i++) { files[i] = new File(path[i]).getAbsoluteFile(); } try { client.setCommitHandler(createCommitMessageHandler(false, false)); SVNDepth svnDepth = SVNDepth.fromID(depth); boolean recurse = SVNDepth.recurseFromDepth(svnDepth); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); return client.doCommit(files, noUnlock, message, revisionProperties, changelists, keepChangelist, !recurse, svnDepth).getNewRevision(); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } return -1; }
public void opSetDirDepthTemp(File localAbspath, SVNDepth depth) throws SVNException { assert (isAbsolute(localAbspath)); assert (depth.getId() >= SVNDepth.EMPTY.getId() && depth.getId() <= SVNDepth.INFINITY.getId()); DirParsedInfo parseDir = parseDir(localAbspath, Mode.ReadWrite); SVNWCDbDir pdh = parseDir.wcDbDir; File localRelpath = parseDir.localRelPath; verifyDirUsable(pdh); updateDepthValues(localAbspath, pdh, localRelpath, depth); }
SVNErrorManager.error(err, SVNLogType.WC); if (!ambientDepth.isRecursive() || !requestedDepth.isRecursive()) { continue;
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); }
SVNAdminAreaInfo info = null; try { SVNAdminArea anchor = wcAccess.open(path, false, SVNDepth.recurseFromDepth(depth) ? -1 : 1); info = new SVNAdminAreaInfo(wcAccess, anchor, anchor, ""); } catch (SVNException svne) { if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { info = wcAccess.openAnchor(path, false, SVNDepth.recurseFromDepth(depth) ? -1 : 1); if (depth == SVNDepth.EMPTY) { depth = SVNDepth.IMMEDIATES;
/** * Says whether this object and <code>obj</code> are equal. * * @param obj another object to compare with * @return <span class="javakeyword">true</span> if equal; otherwise <span class="javakeyword">false</span> */ public boolean equals(Object obj) { return compareTo(obj) == 0; }
SVNErrorManager.error(err, SVNLogType.WC); if (depthIsSticky && depth.compareTo(SVNDepth.INFINITY) < 0) { SVNEntry targetEntry = anchorArea.getEntry(info.getTargetName(), true); if (targetEntry != null && targetEntry.isDirectory()) { if (targetRevision >= 0 && !isIgnoreExternals() && depth.isRecursive()) { url = target == null ? url : url.removePathTail(); handleExternals(wcAccess, info.getAnchor().getRoot(), info.getOldExternals(), info.getNewExternals(),
public long commit(String[] path, String message, int depth, boolean noUnlock, boolean keepChangelist, String[] changelists, Map revprops) throws ClientException { if (path == null || path.length == 0) { return 0; } SVNCommitClient client = getSVNCommitClient(); File[] files = new File[path.length]; for (int i = 0; i < path.length; i++) { files[i] = new File(path[i]).getAbsoluteFile(); } try { client.setCommitHandler(createCommitMessageHandler(false, false)); SVNDepth svnDepth = SVNDepth.fromID(depth); boolean recurse = SVNDepth.recurseFromDepth(svnDepth); SVNProperties revisionProperties = revprops == null ? null : SVNProperties.wrap(revprops); return client.doCommit(files, noUnlock, message, revisionProperties, changelists, keepChangelist, !recurse, svnDepth).getNewRevision(); } catch (SVNException e) { throwException(e); } finally { if (client != null) { client.setCommitHandler(null); } resetLog(); } return -1; }
if (childKind == SVNWCDbKind.File || depth.getId() >= SVNDepth.IMMEDIATES.getId()) { if (matchesChangelist(childAbspath, changelists)) { nodeHandler.nodeFound(childAbspath, childKind); if (childKind == SVNWCDbKind.Dir && depth.getId() >= SVNDepth.IMMEDIATES.getId()) { SVNDepth depth_below_here = depth; if (depth.getId() == SVNDepth.IMMEDIATES.getId()) { depth_below_here = SVNDepth.EMPTY;
SVNErrorManager.error(err, SVNLogType.WC); if (!ambientDepth.isRecursive() || !requestedDepth.isRecursive()) {
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); }
SVNAdminAreaInfo info = null; try { SVNAdminArea anchor = wcAccess.open(path, false, SVNDepth.recurseFromDepth(depth) ? -1 : 1); info = new SVNAdminAreaInfo(wcAccess, anchor, anchor, ""); } catch (SVNException svne) { if (svne.getErrorMessage().getErrorCode() == SVNErrorCode.WC_NOT_DIRECTORY) { info = wcAccess.openAnchor(path, false, SVNDepth.recurseFromDepth(depth) ? -1 : 1); if (depth == SVNDepth.EMPTY) { depth = SVNDepth.IMMEDIATES;
/** * Returns a string representation of this object. * * @return string representation of this object */ public String toString() { return getName(); }
/** * @param file * @param revision * @param recursive * @param force * @return actual revision number * @throws SVNException * @deprecated use {@link #doUpdate(File, SVNRevision, SVNDepth, boolean, boolean)} instead */ public long doUpdate(File file, SVNRevision revision, boolean recursive, boolean force) throws SVNException { return doUpdate(file, revision, SVNDepth.fromRecurse(recursive), force, false); }