/** * Creates and returns a copy of this object. * * @return a clone of this instance * */ public Object clone() throws CloneNotSupportedException { try { super.clone(); } catch (CloneNotSupportedException cnse) { return null; } SVNProperties result = new SVNProperties(); result.putAll(this); return result; }
/** * Creates and returns a copy of this object. * * @return a clone of this instance * */ public Object clone() throws CloneNotSupportedException { try { super.clone(); } catch (CloneNotSupportedException cnse) { return null; } SVNProperties result = new SVNProperties(); result.putAll(this); return result; } }
/** * Creates and returns a copy of this object. * * @return a clone of this instance * */ public Object clone() throws CloneNotSupportedException { try { super.clone(); } catch (CloneNotSupportedException cnse) { return null; } SVNProperties result = new SVNProperties(); result.putAll(this); return result; } }
protected void put(SVNProperties props) throws SVNException { SVNProperties thisProps = loadProperties(); thisProps.clear(); thisProps.putAll(props); myIsModified = true; }
protected void put(SVNProperties props) throws SVNException { SVNProperties thisProps = loadProperties(); thisProps.clear(); thisProps.putAll(props); myIsModified = true; }
protected void put(SVNProperties props) throws SVNException { SVNProperties thisProps = loadProperties(); thisProps.clear(); thisProps.putAll(props); myIsModified = true; }
private SVNProperties collectProperties(FSRevisionNode revNode) throws SVNException { SVNProperties properties = new SVNProperties(); SVNProperties versionedProps = revNode.getProperties(myFSFS); if (versionedProps != null && versionedProps.size() > 0) { properties.putAll(versionedProps); } SVNProperties metaprops = null; try { metaprops = myFSFS.compoundMetaProperties(revNode.getCreatedRevision()); } catch (SVNException svne) { // } if (metaprops != null && metaprops.size() > 0) { properties.putAll(metaprops); } return properties; }
private SVNProperties collectProperties(FSRevisionNode revNode) throws SVNException { SVNProperties properties = new SVNProperties(); SVNProperties versionedProps = revNode.getProperties(myFSFS); if (versionedProps != null && versionedProps.size() > 0) { properties.putAll(versionedProps); } SVNProperties metaprops = null; try { metaprops = myFSFS.compoundMetaProperties(revNode.getCreatedRevision()); } catch (SVNException svne) { // } if (metaprops != null && metaprops.size() > 0) { properties.putAll(metaprops); } return properties; }
private SVNProperties collectProperties(FSRevisionNode revNode) throws SVNException { SVNProperties properties = new SVNProperties(); SVNProperties versionedProps = revNode.getProperties(myFSFS); if (versionedProps != null && versionedProps.size() > 0) { properties.putAll(versionedProps); } SVNProperties metaprops = null; try { metaprops = myFSFS.compoundMetaProperties(revNode.getCreatedRevision()); } catch (SVNException svne) { // } if (metaprops != null && metaprops.size() > 0) { properties.putAll(metaprops); } return properties; }
public static SVNProperties normalizeRevisionProperties(SVNProperties revProps) throws SVNException { SVNProperties normalizedProps = new SVNProperties(); for (Iterator propNamesIter = revProps.nameSet().iterator(); propNamesIter.hasNext();) { String propName = (String) propNamesIter.next(); if (SVNPropertiesManager.propNeedsTranslation(propName)) { SVNPropertyValue value = revProps.getSVNPropertyValue(propName); String normalizedValue = normalizeString(SVNPropertyValue.getPropertyAsString(value)); if (normalizedValue != null) { normalizedProps.put(propName, SVNPropertyValue.create(normalizedValue)); } } } revProps.putAll(normalizedProps); return normalizedProps; }
public static SVNProperties normalizeRevisionProperties(SVNProperties revProps) throws SVNException { SVNProperties normalizedProps = new SVNProperties(); for (Iterator propNamesIter = revProps.nameSet().iterator(); propNamesIter.hasNext();) { String propName = (String) propNamesIter.next(); if (SVNPropertiesManager.propNeedsTranslation(propName)) { SVNPropertyValue value = revProps.getSVNPropertyValue(propName); String normalizedValue = normalizeString(SVNPropertyValue.getPropertyAsString(value)); if (normalizedValue != null) { normalizedProps.put(propName, SVNPropertyValue.create(normalizedValue)); } } } revProps.putAll(normalizedProps); return normalizedProps; }
public static SVNProperties normalizeRevisionProperties(SVNProperties revProps) throws SVNException { SVNProperties normalizedProps = new SVNProperties(); for (Iterator propNamesIter = revProps.nameSet().iterator(); propNamesIter.hasNext();) { String propName = (String) propNamesIter.next(); if (SVNPropertiesManager.propNeedsTranslation(propName)) { SVNPropertyValue value = revProps.getSVNPropertyValue(propName); String normalizedValue = normalizeString(SVNPropertyValue.getPropertyAsString(value)); if (normalizedValue != null) { normalizedProps.put(propName, SVNPropertyValue.create(normalizedValue)); } } } revProps.putAll(normalizedProps); return normalizedProps; }
public SVNProperties getRevisionProperties(long revision, SVNProperties properties) throws SVNException { assertValidRevision(revision); try { openRepository(); properties = properties == null ? new SVNProperties() : properties; properties.putAll(myFSFS.getRevisionProperties(revision)); } finally { closeRepository(); } return properties; }
public SVNProperties getRevisionProperties(long revision, SVNProperties properties) throws SVNException { assertValidRevision(revision); try { openRepository(); properties = properties == null ? new SVNProperties() : properties; properties.putAll(myFSFS.getRevisionProperties(revision)); } finally { closeRepository(); } return properties; }
public SVNProperties getRevisionProperties(long revision, SVNProperties properties) throws SVNException { assertValidRevision(revision); try { openRepository(); properties = properties == null ? new SVNProperties() : properties; properties.putAll(myFSFS.getRevisionProperties(revision)); } finally { closeRepository(); } return properties; }
public long getDir(String path, long revision, SVNProperties properties, int entryFields, ISVNDirEntryHandler handler) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); FSRevisionNode parent = root.getRevisionNode(repositoryPath); if (handler != null) { SVNURL parentURL = getLocation().appendPath(path, false); Collection entriesCollection = getDirEntries(parent, parentURL, entryFields); Iterator entries = entriesCollection.iterator(); while (entries.hasNext()) { SVNDirEntry entry = (SVNDirEntry) entries.next(); handler.handleDirEntry(entry); } } if (properties != null) { properties.putAll(collectProperties(parent)); } return revision; } finally { closeRepository(); } }
public long getDir(String path, long revision, SVNProperties properties, int entryFields, ISVNDirEntryHandler handler) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); FSRevisionNode parent = root.getRevisionNode(repositoryPath); if (handler != null) { SVNURL parentURL = getLocation().appendPath(path, false); Collection entriesCollection = getDirEntries(parent, parentURL, entryFields); Iterator entries = entriesCollection.iterator(); while (entries.hasNext()) { SVNDirEntry entry = (SVNDirEntry) entries.next(); handler.handleDirEntry(entry); } } if (properties != null) { properties.putAll(collectProperties(parent)); } return revision; } finally { closeRepository(); } }
public long getDir(String path, long revision, SVNProperties properties, int entryFields, ISVNDirEntryHandler handler) throws SVNException { try { openRepository(); if (!SVNRepository.isValidRevision(revision)) { revision = myFSFS.getYoungestRevision(); } String repositoryPath = getRepositoryPath(path); FSRevisionRoot root = myFSFS.createRevisionRoot(revision); FSRevisionNode parent = root.getRevisionNode(repositoryPath); if (handler != null) { SVNURL parentURL = getLocation().appendPath(path, false); Collection entriesCollection = getDirEntries(parent, parentURL, entryFields); Iterator entries = entriesCollection.iterator(); while (entries.hasNext()) { SVNDirEntry entry = (SVNDirEntry) entries.next(); handler.handleDirEntry(entry); } } if (properties != null) { properties.putAll(collectProperties(parent)); } return revision; } finally { closeRepository(); } }
public void fileAdded(SvnDiffCallbackResult result, File path, File leftFile, File rightFile, long rev1, long rev2, String mimeType1, String mimeType2, File copyFromPath, long copyFromRevision, SVNProperties propChanges, SVNProperties originalProperties) throws SVNException { generator.setForceEmpty(true); if (diffTargetIsCopy) { if (rev1 == SVNRepository.INVALID_REVISION && this.revision1 != SVNRepository.INVALID_REVISION) { rev1 = this.revision1; } if (rev2 == SVNRepository.INVALID_REVISION && this.revision2 != SVNRepository.INVALID_REVISION) { rev2 = this.revision2; } } if (noCopyFromOnAdd && (copyFromPath != null || SVNRevision.isValidRevisionNumber(copyFromRevision))) { SVNProperties newChanges = new SVNProperties(originalProperties); newChanges.putAll(propChanges); leftFile = null; propChanges = newChanges; originalProperties = new SVNProperties(); copyFromRevision = SVNRepository.INVALID_REVISION; } //TODO: no diff added? if (rightFile != null && copyFromPath != null) { displayContentChanged(path, leftFile, rightFile, NON_EXSTENT_REVISION, rev2, mimeType1, mimeType2, propChanges, originalProperties, OperationKind.Copied, copyFromPath); } else if (rightFile != null) { displayContentChanged(path, leftFile, rightFile, NON_EXSTENT_REVISION, rev2, mimeType1, mimeType2, propChanges, originalProperties, OperationKind.Added, null); } if (propChanges != null && !propChanges.isEmpty()) { //we do not rev1 and rev2 here because SVN doesn't propertiesChanged(path, NON_EXSTENT_REVISION, rev2, false, propChanges, originalProperties); } generator.setForceEmpty(false); }
public Map getDirContents(FSRevisionNode revNode) throws SVNException { FSRepresentation txtRep = revNode.getTextRepresentation(); if (txtRep != null && txtRep.isTxn()) { FSFile childrenFile = getTransactionRevisionNodeChildrenFile(revNode.getId()); Map entries = null; try { SVNProperties rawEntries = childrenFile.readProperties(false, false); rawEntries.putAll(childrenFile.readProperties(true, false)); rawEntries.removeNullValues(); entries = parsePlainRepresentation(rawEntries, true); } finally { childrenFile.close(); } return entries; } else if (txtRep != null) { return parsePlainRepresentation(parseProperties(txtRep), false); } return new SVNHashMap();// returns an empty map, must not be null!! }