private SVNProperties removeNonPropChanges(SVNProperties pristineProps, SVNProperties changes) { SVNProperties newChanges = new SVNProperties(); for (Iterator<Map.Entry<String, SVNPropertyValue>> iterator = changes.asMap().entrySet().iterator(); iterator.hasNext(); ) { final Map.Entry<String, SVNPropertyValue> entry = iterator.next(); String name = entry.getKey(); SVNPropertyValue value = entry.getValue(); boolean remove = false; if (value != null) { SVNPropertyValue oldValue = pristineProps.getSVNPropertyValue(name); if (oldValue != null && oldValue.equals(value)) { remove = true; } } if (!remove) { newChanges.put(name, value); } } return newChanges; }
@SuppressWarnings("unchecked") public void bindProperties(int i, SVNProperties props) throws SVNException { adjustBinds(i); binds.set(i - 1, props != null ? SVNSkel.createPropList(props.asMap()).unparse() : null); }
public static SVNSkel createInheritedProperties(Map<String, SVNProperties> iprops) throws SVNException { SVNSkel result = createEmptyList(); for (String path : iprops.keySet()) { SVNSkel pathSkel = SVNSkel.createAtom(path); SVNSkel propSkel = SVNSkel.createPropList(iprops.get(path).asMap()); result.appendChild(pathSkel); result.appendChild(propSkel); } return result; }
private static void checkProp(@NotNull SVNProperties props, @Nullable Map<String, String> expected) { final Map<String, String> check = new HashMap<>(); if (expected != null) { check.putAll(expected); } for (Map.Entry<String, SVNPropertyValue> entry : props.asMap().entrySet()) { if (entry.getKey().startsWith(SVNProperty.SVN_ENTRY_PREFIX)) continue; Assert.assertEquals(entry.getValue().getString(), check.remove(entry.getKey())); } Assert.assertTrue(check.isEmpty()); }
private byte[] createTxnPostBody(SVNProperties revisionProperties) throws SVNException { SVNSkel requestSkel = SVNSkel.createEmptyList(); if (revisionProperties != null) { SVNSkel propListSkel = SVNSkel.createPropList(revisionProperties.asMap()); requestSkel.prepend(propListSkel); requestSkel.prependString(CREATE_TXN_WITH_PROPS); return requestSkel.unparse(); } else { return ("( " + CREATE_TXN + " )").getBytes(); } } }
for (SvnInheritedProperties inheritedConfigAutoProperty : inheritedConfigAutoProperties[0]) { SVNProperties inheritedProperties = inheritedConfigAutoProperty.getProperties(); Map<String, SVNPropertyValue> inheritedPropertiesMap = inheritedProperties.asMap(); for (Map.Entry<String, SVNPropertyValue> entry : inheritedPropertiesMap.entrySet()) { String propertyName = entry.getKey(); Map<String, SVNPropertyValue> regularPropertiesMap = regularProperties.asMap(); for (Map.Entry<String, SVNPropertyValue> entry : regularPropertiesMap.entrySet()) { String propertyName = entry.getKey();
for (SvnInheritedProperties inheritedConfigAutoProperty : inheritedConfigAutoProperties[0]) { SVNProperties inheritedProperties = inheritedConfigAutoProperty.getProperties(); Map<String, SVNPropertyValue> inheritedPropertiesMap = inheritedProperties.asMap(); for (Map.Entry<String, SVNPropertyValue> entry : inheritedPropertiesMap.entrySet()) { String propertyName = entry.getKey(); Map<String, SVNPropertyValue> regularPropertiesMap = regularProperties.asMap(); for (Map.Entry<String, SVNPropertyValue> entry : regularPropertiesMap.entrySet()) { String propertyName = entry.getKey();
propConflict.prepend(SVNSkel.createPropList(theirProps.asMap())); } else { propConflict.prepend(SVNSkel.createAtom("")); propConflict.prepend(SVNSkel.createPropList(mineProps.asMap())); } else { propConflict.prepend(SVNSkel.createAtom("")); propConflict.prepend(SVNSkel.createPropList(theirOldProps.asMap())); } else { propConflict.prepend(SVNSkel.createAtom(""));