public FSFile openAndSeekRepresentation(FSRepresentation rep) throws SVNException { if (!rep.isTxn()) { return openAndSeekRevision(rep.getRevision(), rep.getItemIndex()); } return openAndSeekTransaction(rep); }
public FSFile openAndSeekRepresentation(FSRepresentation rep) throws SVNException { if (!rep.isTxn()) { return openAndSeekRevision(rep.getRevision(), rep.getOffset()); } return openAndSeekTransaction(rep); }
public FSFile openAndSeekRepresentation(FSRepresentation rep) throws SVNException { if (!rep.isTxn()) { return openAndSeekRevision(rep.getRevision(), rep.getOffset()); } return openAndSeekTransaction(rep); }
public FSFile openAndSeekRepresentation(FSRepresentation rep) throws SVNException { if (!rep.isTxn()) { return openAndSeekRevision(rep.getRevision(), rep.getOffset()); } return openAndSeekTransaction(rep); }
private void removeRevisionNode(FSID id) throws SVNException { FSRevisionNode node = getOwner().getRevisionNode(id); if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Attempted removal of immutable node"); SVNErrorManager.error(err); } if (node.getPropsRepresentation() != null && node.getPropsRepresentation().isTxn()) { SVNFileUtil.deleteFile(getTransactionRevNodePropsFile(id)); } if (node.getTextRepresentation() != null && node.getTextRepresentation().isTxn() && node.getType() == SVNNodeKind.DIR) { SVNFileUtil.deleteFile(getTransactionRevNodeChildrenFile(id)); } SVNFileUtil.deleteFile(getOwner().getTransactionRevNodeFile(id)); }
private void removeRevisionNode(FSID id) throws SVNException { FSRevisionNode node = getOwner().getRevisionNode(id); if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Attempted removal of immutable node"); SVNErrorManager.error(err, SVNLogType.FSFS); } if (node.getPropsRepresentation() != null && node.getPropsRepresentation().isTxn()) { SVNFileUtil.deleteFile(getTransactionRevNodePropsFile(id)); } if (node.getTextRepresentation() != null && node.getTextRepresentation().isTxn() && node.getType() == SVNNodeKind.DIR) { SVNFileUtil.deleteFile(getTransactionRevNodeChildrenFile(id)); } SVNFileUtil.deleteFile(getOwner().getTransactionRevNodeFile(id)); }
private void removeRevisionNode(FSID id) throws SVNException { FSRevisionNode node = getOwner().getRevisionNode(id); if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Attempted removal of immutable node"); SVNErrorManager.error(err, SVNLogType.FSFS); } if (node.getPropsRepresentation() != null && node.getPropsRepresentation().isTxn()) { SVNFileUtil.deleteFile(getTransactionRevNodePropsFile(id)); } if (node.getTextRepresentation() != null && node.getTextRepresentation().isTxn() && node.getType() == SVNNodeKind.DIR) { SVNFileUtil.deleteFile(getTransactionRevNodeChildrenFile(id)); } SVNFileUtil.deleteFile(getOwner().getTransactionRevNodeFile(id)); }
private void removeRevisionNode(FSID id) throws SVNException { FSRevisionNode node = getOwner().getRevisionNode(id); if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Attempted removal of immutable node"); SVNErrorManager.error(err, SVNLogType.FSFS); } if (node.getPropsRepresentation() != null && node.getPropsRepresentation().isTxn()) { SVNFileUtil.deleteFile(getTransactionRevNodePropsFile(id)); } if (node.getTextRepresentation() != null && node.getTextRepresentation().isTxn() && node.getType() == SVNNodeKind.DIR) { SVNFileUtil.deleteFile(getTransactionRevNodeChildrenFile(id)); } SVNFileUtil.deleteFile(getOwner().getTransactionRevNodeFile(id)); }
public void setProplist(FSRevisionNode node, Map properties) throws SVNException { if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Can't set proplist on *immutable* node-revision {0}", node.getId()); SVNErrorManager.error(err); } File propsFile = getTransactionRevNodePropsFile(node.getId()); SVNProperties.setProperties(properties, propsFile, SVNFileUtil.createUniqueFile(propsFile.getParentFile(), propsFile.getName(), ".tmp"), SVNProperties.SVN_HASH_TERMINATOR); if (node.getPropsRepresentation() == null || !node.getPropsRepresentation().isTxn()) { FSRepresentation mutableRep = new FSRepresentation(); mutableRep.setTxnId(node.getId().getTxnID()); node.setPropsRepresentation(mutableRep); getOwner().putTxnRevisionNode(node.getId(), node); } }
public SVNProperties getProperties(FSRevisionNode revNode) throws SVNException { if (revNode.getPropsRepresentation() != null && revNode.getPropsRepresentation().isTxn()) { FSFile propsFile = null; try { propsFile = getTransactionRevisionNodePropertiesFile(revNode.getId()); return propsFile.readProperties(false, true); } finally { if(propsFile != null){ propsFile.close(); } } } else if (revNode.getPropsRepresentation() != null) { FSRepresentation propsRep = revNode.getPropsRepresentation(); SVNProperties properties = parseProperties(propsRep); return properties == null ? new SVNProperties() : properties; } return new SVNProperties();// no properties? return an empty SVNProperties }
public Map getProperties(FSRevisionNode revNode) throws SVNException { if (revNode.getPropsRepresentation() != null && revNode.getPropsRepresentation().isTxn()) { FSFile propsFile = null; try {
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!! }
public void setProplist(FSRevisionNode node, SVNProperties properties) throws SVNException { if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Can't set proplist on *immutable* node-revision {0}", node.getId()); SVNErrorManager.error(err, SVNLogType.FSFS); } File propsFile = getTransactionRevNodePropsFile(node.getId()); SVNWCProperties.setProperties(properties, propsFile, SVNFileUtil.createUniqueFile(propsFile.getParentFile(), ".props", ".tmp", false), SVNWCProperties.SVN_HASH_TERMINATOR); if (node.getPropsRepresentation() == null || !node.getPropsRepresentation().isTxn()) { FSRepresentation mutableRep = new FSRepresentation(); mutableRep.setTxnId(node.getId().getTxnID()); node.setPropsRepresentation(mutableRep); node.setIsFreshTxnRoot(false); getOwner().putTxnRevisionNode(node.getId(), node); } }
public void setProplist(FSRevisionNode node, SVNProperties properties) throws SVNException { if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Can't set proplist on *immutable* node-revision {0}", node.getId()); SVNErrorManager.error(err, SVNLogType.FSFS); } File propsFile = getTransactionRevNodePropsFile(node.getId()); SVNWCProperties.setProperties(properties, propsFile, SVNFileUtil.createUniqueFile(propsFile.getParentFile(), ".props", ".tmp", false), SVNWCProperties.SVN_HASH_TERMINATOR); if (node.getPropsRepresentation() == null || !node.getPropsRepresentation().isTxn()) { FSRepresentation mutableRep = new FSRepresentation(); mutableRep.setTxnId(node.getId().getTxnID()); node.setPropsRepresentation(mutableRep); node.setIsFreshTxnRoot(false); getOwner().putTxnRevisionNode(node.getId(), node); } }
public void setProplist(FSRevisionNode node, SVNProperties properties) throws SVNException { if (!node.getId().isTxn()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.FS_NOT_MUTABLE, "Can't set proplist on *immutable* node-revision {0}", node.getId()); SVNErrorManager.error(err, SVNLogType.FSFS); } File propsFile = getTransactionRevNodePropsFile(node.getId()); SVNWCProperties.setProperties(properties, propsFile, SVNFileUtil.createUniqueFile(propsFile.getParentFile(), ".props", ".tmp", false), SVNWCProperties.SVN_HASH_TERMINATOR); if (node.getPropsRepresentation() == null || !node.getPropsRepresentation().isTxn()) { FSRepresentation mutableRep = new FSRepresentation(); mutableRep.setTxnId(node.getId().getTxnID()); node.setPropsRepresentation(mutableRep); node.setIsFreshTxnRoot(false); getOwner().putTxnRevisionNode(node.getId(), node); } }
public SVNProperties getProperties(FSRevisionNode revNode) throws SVNException { if (revNode.getPropsRepresentation() != null && revNode.getPropsRepresentation().isTxn()) { FSFile propsFile = null; try {
public SVNProperties getProperties(FSRevisionNode revNode) throws SVNException { if (revNode.getPropsRepresentation() != null && revNode.getPropsRepresentation().isTxn()) { FSFile propsFile = null; try {
if (textRep == null || !textRep.isTxn()) { Map entries = parentRevNode.getDirEntries(getOwner()); Map unparsedEntries = unparseDirEntries(entries);
if (textRep == null || !textRep.isTxn()) { Map entries = parentRevNode.getDirEntries(getOwner()); SVNProperties unparsedEntries = unparseDirEntries(entries);
if (textRep == null || !textRep.isTxn()) { Map entries = parentRevNode.getDirEntries(getOwner()); SVNProperties unparsedEntries = unparseDirEntries(entries);