/** * Appropriate name of <code>depth</code> is returned. If <code>depth</code> does not represent * a recognized depth, <code>"INVALID-DEPTH"</code> is returned. * @param depth depth, which name needs to be returned * @return the name of depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static String asString(SVNDepth depth) { if (depth != null) { return depth.getName(); } return "INVALID-DEPTH"; }
/** * Returns a string representation of this object. * * @return string representation of this object */ public String toString() { return getName(); }
/** * Returns a string representation of this object. * * @return string representation of this object */ public String toString() { return getName(); }
/** * Returns a string representation of this object. * * @return string representation of this object */ public String toString() { return getName(); }
/** * Appropriate name of <code>depth</code> is returned. If <code>depth</code> does not represent * a recognized depth, <code>"INVALID-DEPTH"</code> is returned. * @param depth depth, which name needs to be returned * @return the name of depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static String asString(SVNDepth depth) { if (depth != null) { return depth.getName(); } return "INVALID-DEPTH"; }
/** * Appropriate name of <code>depth</code> is returned. If <code>depth</code> does not represent * a recognized depth, <code>"INVALID-DEPTH"</code> is returned. * @param depth depth, which name needs to be returned * @return the name of depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static String asString(SVNDepth depth) { if (depth != null) { return depth.getName(); } return "INVALID-DEPTH"; }
/** * Based on string value finds <code>SVNDepth</code> value. * @param string depth value represented by string * @return depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static SVNDepth fromString(String string) { if (EMPTY.getName().equals(string)) { return EMPTY; } else if (EXCLUDE.getName().equals(string)) { return EXCLUDE; } else if (FILES.getName().equals(string)) { return FILES; } else if (IMMEDIATES.getName().equals(string)) { return IMMEDIATES; } else if (INFINITY.getName().equals(string)) { return INFINITY; } else { return UNKNOWN; } }
/** * Based on string value finds <code>SVNDepth</code> value. * @param string depth value represented by string * @return depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static SVNDepth fromString(String string) { if (EMPTY.getName().equals(string)) { return EMPTY; } else if (EXCLUDE.getName().equals(string)) { return EXCLUDE; } else if (FILES.getName().equals(string)) { return FILES; } else if (IMMEDIATES.getName().equals(string)) { return IMMEDIATES; } else if (INFINITY.getName().equals(string)) { return INFINITY; } else { return UNKNOWN; } }
/** * Based on string value finds <code>SVNDepth</code> value. * @param string depth value represented by string * @return depth * @since SVNKit 1.2.0, SVN 1.5.0 */ public static SVNDepth fromString(String string) { if (EMPTY.getName().equals(string)) { return EMPTY; } else if (EXCLUDE.getName().equals(string)) { return EXCLUDE; } else if (FILES.getName().equals(string)) { return FILES; } else if (IMMEDIATES.getName().equals(string)) { return IMMEDIATES; } else if (INFINITY.getName().equals(string)) { return INFINITY; } else { return UNKNOWN; } }
public void setDepth(SVNDepth depth) { setAttributeValue(SVNProperty.DEPTH, depth.getName()); }
public void setDepth(SVNDepth depth) { setAttributeValue(SVNProperty.DEPTH, depth.getName()); }
@DataBoundConstructor public ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) { this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim()); this.local = Util.fixEmptyAndTrim(local); this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName() : depthOption; this.ignoreExternalsOption = ignoreExternalsOption; }
public void setPathReport(@NotNull String path, int rev, boolean startEmpty, @NotNull SVNDepth depth) throws SVNException { final String wcPath = wcPath(path); paths.put(wcPath, new SetPathParams(path, rev, startEmpty, new String[0], depth.getName())); forcePath(wcPath); }
@DataBoundConstructor public ModuleLocation(String remote, String local, String depthOption, boolean ignoreExternalsOption) { this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim()); this.local = Util.fixEmptyAndTrim(local); this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName() : depthOption; this.ignoreExternalsOption = ignoreExternalsOption; }
@DataBoundConstructor public ModuleLocation(String remote, String credentialsId, String local, String depthOption, boolean ignoreExternalsOption, boolean cancelProcessOnExternalsFail) { this.remote = Util.removeTrailingSlash(Util.fixNull(remote).trim()); this.credentialsId = credentialsId; this.local = fixEmptyAndTrim(local); this.depthOption = StringUtils.isEmpty(depthOption) ? SVNDepth.INFINITY.getName() : depthOption; this.ignoreExternalsOption = ignoreExternalsOption; this.cancelProcessOnExternalsFail = cancelProcessOnExternalsFail; }
public void writePathInfoToReportFile(String path, String linkPath, String lockToken, long revision, boolean startEmpty, SVNDepth depth) throws SVNException { if (depth == null || depth == SVNDepth.UNKNOWN) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", depth != null ? depth.getName() : "null"); SVNErrorManager.error(err, SVNLogType.FSFS); } String anchorRelativePath = SVNPathUtil.append(getReportTarget(), path); String revisionRep = FSRepository.isValidRevision(revision) ? "+" + String.valueOf(revision) + ":" : "-"; String depthRep = "-";//infinity by default if (depth == SVNDepth.EXCLUDE || depth == SVNDepth.EMPTY || depth == SVNDepth.FILES || depth == SVNDepth.IMMEDIATES) { depthRep = "+" + getDepthLetter(depth); } try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeSingleString(anchorRelativePath, baos); writeSingleString(linkPath, baos); baos.write(revisionRep.getBytes("UTF-8")); baos.write(depthRep.getBytes("UTF-8")); baos.write(startEmpty ? '+' : '-'); writeSingleString(lockToken, baos); OutputStream reportOS = getReportFileForWriting(); reportOS.write(baos.toByteArray()); } catch (IOException ioe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage()); SVNErrorManager.error(err, ioe, SVNLogType.FSFS); } }
public void writePathInfoToReportFile(String path, String linkPath, String lockToken, long revision, boolean startEmpty, SVNDepth depth) throws SVNException { if (depth == null || depth == SVNDepth.UNKNOWN) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", depth != null ? depth.getName() : "null"); SVNErrorManager.error(err, SVNLogType.FSFS); } String anchorRelativePath = SVNPathUtil.append(getReportTarget(), path); String revisionRep = FSRepository.isValidRevision(revision) ? "+" + String.valueOf(revision) + ":" : "-"; String depthRep = "-";//infinity by default if (depth == SVNDepth.EXCLUDE || depth == SVNDepth.EMPTY || depth == SVNDepth.FILES || depth == SVNDepth.IMMEDIATES) { depthRep = "+" + getDepthLetter(depth); } try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeSingleString(anchorRelativePath, baos); writeSingleString(linkPath, baos); baos.write(revisionRep.getBytes("UTF-8")); baos.write(depthRep.getBytes("UTF-8")); baos.write(startEmpty ? '+' : '-'); writeSingleString(lockToken, baos); OutputStream reportOS = getReportFileForWriting(); reportOS.write(baos.toByteArray()); } catch (IOException ioe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage()); SVNErrorManager.error(err, ioe, SVNLogType.FSFS); } }
public void writePathInfoToReportFile(String path, String linkPath, String lockToken, long revision, boolean startEmpty, SVNDepth depth) throws SVNException { if (depth == null || depth == SVNDepth.UNKNOWN) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Unsupported report depth ''{0}''", depth != null ? depth.getName() : "null"); SVNErrorManager.error(err, SVNLogType.FSFS); } String anchorRelativePath = SVNPathUtil.append(getReportTarget(), path); String revisionRep = FSRepository.isValidRevision(revision) ? "+" + String.valueOf(revision) + ":" : "-"; String depthRep = "-";//infinity by default if (depth == SVNDepth.EXCLUDE || depth == SVNDepth.EMPTY || depth == SVNDepth.FILES || depth == SVNDepth.IMMEDIATES) { depthRep = "+" + getDepthLetter(depth); } try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeSingleString(anchorRelativePath, baos); writeSingleString(linkPath, baos); baos.write(revisionRep.getBytes("UTF-8")); baos.write(depthRep.getBytes("UTF-8")); baos.write(startEmpty ? '+' : '-'); writeSingleString(lockToken, baos); OutputStream reportOS = getReportFileForWriting(); reportOS.write(baos.toByteArray()); } catch (IOException ioe) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.IO_ERROR, ioe.getLocalizedMessage()); SVNErrorManager.error(err, ioe, SVNLogType.FSFS); } }
entryAttrs.put(SVNProperty.DEPTH, SVNDepth.INFINITY.getName()); } else { entryAttrs.put(SVNProperty.DEPTH, depthStr);
entryAttrs.put(SVNProperty.DEPTH, SVNDepth.INFINITY.getName()); } else { entryAttrs.put(SVNProperty.DEPTH, depthStr);