public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } final PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); final Map<String, Map<String, byte[]>> propsMap = new TreeMap<String, Map<String,byte[]>>(SVNPathUtil.PATH_COMPARATOR); for (int i = 0; i < properties.length; i++) { final String propertyPath = properties[i].getPath(); if (!propsMap.containsKey(propertyPath)) { propsMap.put(propertyPath, new HashMap<String, byte[]>()); } propsMap.get(propertyPath).put(properties[i].getName(), properties[i].getData()); } for (String propertyPath : propsMap.keySet()) { final Map<String, byte[]> pathProps = propsMap.get(propertyPath); callback.singlePath(propertyPath, pathProps); } }
public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); Map propsMap = new SVNHashMap(); for (int i = 0; i < properties.length; i++) { propsMap.put(properties[i].getName(), properties[i].getValue()); } callback.singlePath(path, propsMap); }
public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); Map propsMap = new SVNHashMap(); for (int i = 0; i < properties.length; i++) { propsMap.put(properties[i].getName(), properties[i].getValue()); } callback.singlePath(path, propsMap); }
assertEquals("abc", prop.getName()); assertEquals("def", prop.getValue());
assertEquals("abc", prop.getName()); assertEquals("def", prop.getValue());
public void testSetRevProp() throws SubversionException, IOException { OneTest thisTest = new OneTest(false); final String MSG = "Initial repository creation"; admin.setRevProp(thisTest.getRepositoryPath(), Revision.getInstance(0), "svn:log", MSG, false, false); PropertyData[] pdata = client.revProperties( makeReposUrl(thisTest.getRepository()), Revision.getInstance(0)); assertNotNull("expect non null rev props"); String logMessage = null; for (int i = 0; i < pdata.length; i++) { if ("svn:log".equals(pdata[i].getName())) { logMessage = pdata[i].getValue(); break; } } assertEquals("expect rev prop change to take effect", MSG, logMessage); } public void testLoadRepo()