public void receive(SvnTarget target, SvnStatus status) throws SVNException { callback.doStatus(target == null ? null : target.getPathOrUrlString(), getStatus(status)); } };
public void flush() { if (lastTarget != null) { callback.singlePath(lastTarget == null ? null : lastTarget.getPathOrUrlString(), null, getInheritedProperties(lastInheritedProperties)); lastTarget = null; } } }
public void receive(SvnTarget target, List<SvnInheritedProperties> inheritedProperties) throws SVNException { if (lastTarget != null && !lastTarget.equals(target)) { callback.singlePath(lastTarget == null ? null : lastTarget.getPathOrUrlString(), null, getInheritedProperties(lastInheritedProperties)); } lastTarget = target; lastInheritedProperties = inheritedProperties; } };
private String getDisplayPath(SvnTarget path) { if (path.isFile()) { final String absolutePath = path.getFile().getAbsolutePath().replace(File.separatorChar, '/'); final String currentPath = new File("").getAbsolutePath().replace(File.separatorChar, '/'); String relativePath = getRelativePath(absolutePath, currentPath); if (relativePath != null) { return relativePath; } else { return absolutePath; } } return path.getPathOrUrlString(); }
public void receive(SvnTarget target, SVNProperties properties) throws SVNException { if (lastTarget != null) { callback.singlePath(lastTarget == null ? null : lastTarget.getPathOrUrlString(), getProperties(properties), getInheritedProperties(lastInheritedProperties)); } lastTarget = null; } };
public void receive(SvnTarget target, SVNProperties svnProperties) throws SVNException { callback.singlePath(target == null ? null : target.getPathOrUrlString(), getProperties(svnProperties)); } };
private static Collection<InheritedProplistCallback.InheritedItem> getInheritedProperties(List<SvnInheritedProperties> inheritedProperties) { if (inheritedProperties == null) { return null; } final List<InheritedProplistCallback.InheritedItem> inheritedItems = new ArrayList<InheritedProplistCallback.InheritedItem>(); for (SvnInheritedProperties inheritedPropertiesItem : inheritedProperties) { SvnTarget target = inheritedPropertiesItem.getTarget(); inheritedItems.add(new InheritedProplistCallback.InheritedItem(target == null ? null : target.getPathOrUrlString(), getProperties(inheritedPropertiesItem.getProperties()))); } return inheritedItems; }
private String getDisplayPath(SvnTarget target) { String relativePath; if (baseTarget == null) { relativePath = null; } else { String targetString = target.getPathOrUrlDecodedString(); String baseTargetString = baseTarget.getPathOrUrlDecodedString(); relativePath = getRelativePath(targetString, baseTargetString); } return relativePath != null ? relativePath : target.getPathOrUrlString(); }
private String getRelativeToRootPath(SvnTarget target, SvnTarget originalTarget) { String relativePath; if (repositoryRoot == null) { relativePath = null; } else { if (repositoryRoot.isFile() == target.isFile()) { String targetString = target.getPathOrUrlDecodedString(); String baseTargetString = repositoryRoot.getPathOrUrlDecodedString(); relativePath = getRelativePath(targetString, baseTargetString); } else { String targetString = target.getPathOrUrlDecodedString(); String baseTargetString = new File("").getAbsolutePath(); relativePath = getRelativePath(targetString, baseTargetString); } } return relativePath != null ? relativePath : target.getPathOrUrlString(); }
private void printInhertiedProperties(SvnTarget target, List<SvnInheritedProperties> propsList) { final String name; if (target.isURL()) { name = target.getPathOrUrlString(); } else { name = SVNCommandUtil.getLocalPath(getSVNEnvironment().getRelativePath(target.getFile())); } for (SvnInheritedProperties props : propsList) { if (!getSVNEnvironment().isQuiet()) { getSVNEnvironment().getOut().println("Inherited properties on '" + name + "',"); if (props.getTarget().isURL()) { getSVNEnvironment().getOut().println("from '" + props.getTarget().getPathOrUrlString() + "':"); } else { final String localPath = SVNCommandUtil.getLocalPath(getSVNEnvironment().getRelativePath(props.getTarget().getFile())); getSVNEnvironment().getOut().println("from '" + localPath + "':"); } } final List<SVNPropertyData> propdataList = getPropdataList(props.getProperties()); printProplist(propdataList, false); } }
private void printInhertiedProperties(SvnTarget target, List<SvnInheritedProperties> propsList) { final String name; if (target.isURL()) { name = target.getPathOrUrlString(); } else { name = SVNCommandUtil.getLocalPath(getSVNEnvironment().getRelativePath(target.getFile())); } for (SvnInheritedProperties props : propsList) { if (!getSVNEnvironment().isQuiet()) { getSVNEnvironment().getOut().println("Inherited properties on '" + name + "',"); if (props.getTarget().isURL()) { getSVNEnvironment().getOut().println("from '" + props.getTarget().getPathOrUrlString() + "':"); } else { final String localPath = SVNCommandUtil.getLocalPath(getSVNEnvironment().getRelativePath(props.getTarget().getFile())); getSVNEnvironment().getOut().println("from '" + localPath + "':"); } } final List<SVNPropertyData> propdataList = getPropdataList(props.getProperties()); printProplist(propdataList, false); } }
private void printInhertiedPropertiesXML(SvnTarget target, List<SvnInheritedProperties> propsList) { for (SvnInheritedProperties props : propsList) { final String name; if (props.getTarget().isURL()) { name = props.getTarget().getPathOrUrlString(); } else { name = SVNFileUtil.getFilePath(props.getTarget().getFile()); } StringBuffer buffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", name, null); printXMLPropHash(buffer, props.getProperties(), !getSVNEnvironment().isVerbose(), true); buffer = closeXMLTag("target", buffer); getSVNEnvironment().getOut().print(buffer); } }
private void printInhertiedPropertiesXML(SvnTarget target, List<SvnInheritedProperties> propsList) { for (SvnInheritedProperties props : propsList) { final String name; if (props.getTarget().isURL()) { name = props.getTarget().getPathOrUrlString(); } else { name = SVNFileUtil.getFilePath(props.getTarget().getFile()); } StringBuffer buffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", name, null); printXMLPropHash(buffer, props.getProperties(), !getSVNEnvironment().isVerbose(), true); buffer = closeXMLTag("target", buffer); getSVNEnvironment().getOut().print(buffer); } }
private void printInhertiedPropertiesXML(SvnTarget target, String propertyName, List<SvnInheritedProperties> propsList) { for (SvnInheritedProperties props : propsList) { final SVNPropertyValue pv = props.getProperties().getSVNPropertyValue(propertyName); if (pv == null) { continue; } final SVNPropertyData pd = new SVNPropertyData(propertyName, pv, getSVNEnvironment().getOptions()); final String name; if (props.getTarget().isURL()) { name = props.getTarget().getPathOrUrlString(); } else { name = SVNFileUtil.getFilePath(props.getTarget().getFile()); } StringBuffer buffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", name, null); buffer = addXMLProp(pd, true, buffer); buffer = closeXMLTag("target", buffer); getSVNEnvironment().getOut().print(buffer); } }
private void printInhertiedPropertiesXML(SvnTarget target, String propertyName, List<SvnInheritedProperties> propsList) { for (SvnInheritedProperties props : propsList) { final SVNPropertyValue pv = props.getProperties().getSVNPropertyValue(propertyName); if (pv == null) { continue; } final SVNPropertyData pd = new SVNPropertyData(propertyName, pv, getSVNEnvironment().getOptions()); final String name; if (props.getTarget().isURL()) { name = props.getTarget().getPathOrUrlString(); } else { name = SVNFileUtil.getFilePath(props.getTarget().getFile()); } StringBuffer buffer = openXMLTag("target", SVNXMLUtil.XML_STYLE_NORMAL, "path", name, null); buffer = addXMLProp(pd, true, buffer); buffer = closeXMLTag("target", buffer); getSVNEnvironment().getOut().print(buffer); } }