Class FSFS
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.io.fs.FSFS
-
public class FSFS extends java.lang.Object
- Version:
- 1.3
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
BLOCK_SIZE_OPTION
static java.lang.String
CHILDREN_LOCK_KEY
static java.lang.String
COMMENT_LOCK_KEY
static java.lang.String
COMPRESS_PACKED_REVPROPS_OPTION
static java.lang.String
CREATION_DATE_LOCK_KEY
static java.lang.String
CURRENT_FILE
static java.lang.String
DAV_DIR
static java.lang.String
DB_DIR
static int
DB_FORMAT
static java.lang.String
DB_FORMAT_FILE
static int
DB_FORMAT_LOW
static int
DB_FORMAT_PRE_17
static boolean
DB_FORMAT_PRE_17_USE_AS_DEFAULT
static java.lang.String
DB_LOCK_FILE
static java.lang.String
DB_LOGS_LOCK_FILE
private static java.lang.String
DB_TYPE
private static long
DEFAULT_MAX_FILES_PER_DIRECTORY
static int
DIGEST_SUBDIR_LEN
static java.lang.String
ENABLE_REP_SHARING_OPTION
static java.lang.String
EXPIRATION_DATE_LOCK_KEY
static java.lang.String
FS_TYPE_FILE
static java.lang.String
IO_SECTION
static java.lang.String
IS_DAV_COMMENT_LOCK_KEY
static java.lang.String
L2P_PAGE_SIZE_OPTION
static int
LAYOUT_FORMAT_OPTION_MINIMAL_FORMAT
static java.lang.String
LOCKS_DIR
static java.lang.String
MANIFEST_FILE
static int
MIN_CURRENT_TXN_FORMAT
static int
MIN_KIND_IN_CHANGED_FORMAT
static int
MIN_LOG_ADDRESSING_MINIMAL_FORMAT
static int
MIN_MERGE_INFO_FORMAT
static int
MIN_MERGEINFO_IN_CHANGED_FORMAT
static int
MIN_NO_GLOBAL_IDS_FORMAT
static int
MIN_PACKED_FORMAT
static int
MIN_PACKED_REVPROP_FORMAT
static int
MIN_PACKED_REVPROP_SQLITE_DEV_FORMAT
static int
MIN_PROTOREVS_DIR_FORMAT
static int
MIN_REP_SHARING_FORMAT
static int
MIN_SVNDIFF1_FORMAT
static java.lang.String
MIN_UNPACKED_REV
static java.lang.String
MIN_UNPACKED_REV_FILE
private long
myBlockSize
private boolean
myCompressPackedRevprops
private SVNConfigFile
myConfig
private java.io.File
myCurrentFile
private int
myDBFormat
private java.io.File
myDBFormatFile
private java.io.File
myDBRoot
private java.lang.String
myFSType
private java.io.File
myFSTypeFile
private boolean
myIsHooksEnabled
private boolean
myIsRepSharingAllowed
private long
myL2PPageSize
private java.io.File
myLocksRoot
private long
myMaxFilesPerDirectory
private java.io.File
myMinUnpackedRevFile
private long
myMinUnpackedRevision
private long
myMinUnpackedRevProp
private java.io.File
myNodeOriginsDir
private long
myP2LPageSize
private IFSRepresentationCacheManager
myReposCacheManager
private int
myReposFormat
private java.io.File
myRepositoryCacheFile
private java.io.File
myRepositoryFormatFile
private java.io.File
myRepositoryRoot
private java.io.File
myRevisionPropertiesRoot
private java.io.File
myRevisionsRoot
private long
myRevpropPackSize
private java.io.File
myTransactionCurrentFile
private java.io.File
myTransactionCurrentLockFile
private java.io.File
myTransactionProtoRevsRoot
private java.io.File
myTransactionsRoot
private boolean
myUseLogAddressing
private java.lang.String
myUUID
private java.io.File
myUUIDFile
private java.io.File
myWriteLockFile
private long
myYoungestRevisionCache
static java.lang.String
NODE_ORIGINS_DIR
static java.lang.String
OWNER_LOCK_KEY
static java.lang.String
P2L_PAGE_SIZE_OPTION
static java.lang.String
PACK_EXT
static java.lang.String
PACK_KIND_MANIFEST
static java.lang.String
PACK_KIND_PACK
static java.lang.String
PACKED_REVPROPS_SECTION
static java.lang.String
PATH_CONFIG
static java.lang.String
PATH_LOCK_KEY
static java.lang.String
PATH_PREFIX_NODE
static java.lang.String
PRE_12_COMPAT_UNNEEDED_FILE_CONTENTS
static java.lang.String
REP_CACHE_DB
static java.lang.String
REP_SHARING_SECTION
static java.lang.String
REPOS_FORMAT_FILE
static int
REPOSITORY_FORMAT
static int
REPOSITORY_FORMAT_LEGACY
static java.lang.String
REVISION_PROPERTIES_DB
static java.lang.String
REVISION_PROPERTIES_DIR
static java.lang.String
REVISION_PROPERTIES_TABLE
static java.lang.String
REVPROP_PACK_SIZE_OPTION
static java.lang.String
REVS_DIR
static java.lang.String
SVN_OPAQUE_LOCK_TOKEN
static java.lang.String
TOKEN_LOCK_KEY
static java.lang.String
TRANSACTION_PROTOS_DIR
static java.lang.String
TRANSACTIONS_DIR
static java.lang.String
TXN_CURRENT_FILE
static java.lang.String
TXN_CURRENT_LOCK_FILE
static java.lang.String
TXN_MERGEINFO_PATH
static java.lang.String
TXN_PATH_EXT
static java.lang.String
TXN_PATH_EXT_CHILDREN
static java.lang.String
TXN_PATH_EXT_PROPS
static java.lang.String
TXN_PATH_REV
static java.lang.String
UUID_FILE
static java.lang.String
WRITE_LOCK_FILE
-
Constructor Summary
Constructors Constructor Description FSFS(java.io.File repositoryRoot)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private byte[]
applyDeltaFromFSFile(FSFile revisionFile, int deltaSize, java.io.InputStream baseStream, java.lang.StringBuilder outputChecksum)
void
changeTransactionProperties(java.lang.String txnId, SVNProperties txnProperties)
void
close()
SVNProperties
compoundMetaProperties(long revision)
void
createNewTxnNodeRevisionFromRevision(java.lang.String txnID, FSRevisionNode sourceNode)
FSRevisionRoot
createRevisionRoot(long revision)
FSTransactionRoot
createTransactionRoot(FSTransactionInfo txn)
private static long
decodeUncompressedSize(java.io.InputStream inputStream, int lengthRecordSize, int[] outputBytesRead)
void
deleteLock(SVNLock lock)
private boolean
ensureDirExists(java.io.File dir, boolean create)
private void
ensureRevisionsExists(long revision)
SVNLock
fetchLockFromDigestFile(java.io.File digestFile, java.lang.String repositoryPath, java.util.Collection children)
static java.io.File
findRepositoryRoot(java.io.File path)
static java.lang.String
findRepositoryRoot(java.lang.String host, java.lang.String path)
protected java.io.File
getAbsoluteRevisionPath(long revision)
java.lang.String
getAndIncrementTxnKey()
long
getBlockSize()
java.io.File
getConfigFile()
java.io.File
getCurrentFile()
long
getDatedRevision(java.util.Date date)
int
getDBFormat()
java.io.File
getDBFormatFile()
java.io.File
getDBLocksDir()
java.io.File
getDBLogsLockFile()
java.io.File
getDBRevsDir()
java.io.File
getDBRoot()
static long
getDefaultMaxFilesPerDirectory()
long
getDeletedRevision(java.lang.String path, long startRev, long endRev)
java.io.File
getDigestFileFromRepositoryPath(java.lang.String repositoryPath)
java.lang.String
getDigestFromRepositoryPath(java.lang.String repositoryPath)
java.util.Map
getDirContents(FSRevisionNode revNode)
java.lang.String
getFSType()
java.io.File
getFSTypeFile()
long
getL2PPageSize()
SVNLock
getLock(java.lang.String repositoryPath, boolean haveWriteLock, boolean throwError)
SVNLock
getLockHelper(java.lang.String repositoryPath, boolean haveWriteLock)
protected java.io.File
getManifestFile(long revision)
long
getMaxFilesPerDirectory()
long
getMinUnpackedRev()
protected java.io.File
getMinUnpackedRevFile()
long
getMinUnpackedRevProp()
java.io.File
getMinUnpackedRevPropPath()
java.io.File
getNewRevisionFile(long newRevision)
java.io.File
getNewRevisionPropertiesFile(long newRevision)
java.io.File
getNextIDsFile(java.lang.String txnID)
java.lang.String[]
getNextRevisionIDs()
java.lang.String
getNodeOrigin(java.lang.String nodeID)
protected java.io.File
getNodeOriginFile(java.lang.String nodeID)
java.io.File
getNodeOriginsDir()
private SVNProperties
getNodeOriginsFromFile(java.lang.String nodeID)
long
getP2LPageSize()
protected java.io.File
getPackDir(long revision)
long
getPackedBaseRevision(long revision)
protected long
getPackedOffset(long revision)
protected java.io.File
getPackedRevPath(long revision, java.lang.String kind)
private java.io.File
getPackedRevPropFile(long revision)
protected java.io.File
getPackedRevPropsShardPath(long revision)
protected java.io.File
getPackFile(long revision)
protected FSFile
getPackOrRevisionFSFile(long revision)
SVNLocationEntry
getPreviousLocation(java.lang.String path, long revision, long[] appearedRevision)
SVNProperties
getProperties(FSRevisionNode revNode)
int
getReposFormat()
java.io.File
getRepositoryCacheFile()
IFSRepresentationCacheManager
getRepositoryCacheManager()
java.io.File
getRepositoryFormatFile()
java.io.File
getRepositoryRoot()
protected java.io.File
getRevisionFile(long revision)
protected FSFile
getRevisionFSFile(long revision)
FSRevisionNode
getRevisionNode(FSID id)
SVNProperties
getRevisionProperties(long revision)
java.io.File
getRevisionPropertiesDbPath()
java.io.File
getRevisionPropertiesFile(long revision, boolean returnMissing)
java.io.File
getRevisionPropertiesRoot()
private java.util.Date
getRevisionTime(long revision)
protected long
getRevPropPackSize()
protected FSFile
getTransactionChangesFile(java.lang.String txnID)
protected java.io.File
getTransactionCurrentFile()
protected java.io.File
getTransactionCurrentLockFile()
java.io.File
getTransactionDir(java.lang.String txnID)
SVNProperties
getTransactionProperties(java.lang.String txnID)
java.io.File
getTransactionPropertiesFile(java.lang.String txnID)
java.io.File
getTransactionProtoRevFile(java.lang.String txnID)
java.io.File
getTransactionProtoRevLockFile(java.lang.String txnID)
java.io.File
getTransactionProtoRevsDir()
protected FSFile
getTransactionRevisionNodeChildrenFile(FSID txnID)
protected FSFile
getTransactionRevisionNodePropertiesFile(FSID id)
protected FSFile
getTransactionRevisionPrototypeFile(java.lang.String txnID)
java.io.File
getTransactionRevNodeFile(FSID id)
java.io.File
getTransactionsParentDir()
java.lang.String
getUUID()
java.io.File
getUUIDFile()
java.io.File
getWriteLockFile()
long
getYoungestRevision()
boolean
isCompressPackedRevprops()
boolean
isHooksEnabled()
boolean
isPackedRevision(long revision)
private boolean
isPackedRevisionProperties(long revision)
private static boolean
isRepositoryRoot(java.io.File candidatePath)
boolean
isRepSharingAllowed()
boolean
isUseLogAddressing()
java.util.Map
listTransactions()
private SVNConfigFile
loadConfig()
private SVNLock
lock(java.lang.String path, java.lang.String token, java.lang.String username, java.lang.String comment, java.util.Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment)
SVNLock
lockPath(java.lang.String path, java.lang.String token, java.lang.String username, java.lang.String comment, java.util.Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment)
protected long
lookupOffsetInIndex(FSFile file, long revision, long itemIndex)
protected long
lookupOffsetInProtoIndex(FSFile file, java.lang.String txnId, long itemIndex)
void
open()
FSFile
openAndSeekRepresentation(FSRepresentation rep)
private FSFile
openAndSeekRevision(long revision, long itemIndex)
private FSFile
openAndSeekTransaction(FSRepresentation rep)
void
openDB()
void
openForRecovery()
void
openRoot()
FSTransactionInfo
openTxn(java.lang.String txnName)
private java.util.Map
parsePlainRepresentation(SVNProperties entries, boolean mayContainNulls)
private SVNProperties
parseProperties(FSRepresentation txtRep)
private byte[]
parseRawDeltaProperties(FSRepresentation txtRep, java.lang.StringBuilder outputChecksum)
private FSEntry
parseRepEntryValue(java.lang.String name, java.lang.String value)
void
purgeTxn(java.lang.String txnID)
void
putTxnRevisionNode(FSID id, FSRevisionNode revNode)
int
readDBFormat()
private static long
readNumber(java.io.BufferedReader reader)
private static long
readNumber(java.io.InputStream inputStream)
void
readOptions(FSFile formatFile, int formatNumber)
private SVNProperties
readPackedRevisionProperties(long revision)
private static SVNProperties
readProperties(byte[] propsData)
private SVNProperties
readRevisionProperties(long revision)
static void
setDefaultMaxFilesPerDirectory(long maxFilesPerDirectory)
void
setHooksEnabled(boolean enabled)
private void
setLock(SVNLock lock, boolean isDAVComment)
void
setNodeOrigin(java.lang.String nodeID, FSID nodeRevisionID)
void
setRevisionProperty(long revision, java.lang.String propertyName, SVNPropertyValue propertyValue)
void
setTransactionProperty(java.lang.String txnID, java.lang.String name, SVNPropertyValue propertyValue)
void
setUUID(java.lang.String uuid)
void
setYoungestRevisionCache(long revision)
boolean
supportsMergeInfo()
private void
unlock(java.lang.String path, java.lang.String token, java.lang.String username, boolean breakLock)
void
unlockPath(java.lang.String path, java.lang.String token, java.lang.String username, boolean breakLock, boolean enableHooks)
void
updateMinUnpackedRevProp()
void
upgrade()
private void
verifyBlockSize(long blockSize, long itemSize, java.lang.String name)
void
walkDigestFiles(java.io.File digestFile, ISVNLockHandler getLocksHandler, boolean haveWriteLock)
protected void
writeCurrentFile(long revision, java.lang.String nextNodeID, java.lang.String nextCopyID)
void
writeDBFormat(int format, long maxFilesPerDir, boolean overwrite)
private void
writeDigestLockFile(SVNLock lock, java.util.Collection children, java.lang.String repositoryPath, boolean isDAVComment)
void
writeNextIDs(java.lang.String txnID, java.lang.String nodeID, java.lang.String copyID)
void
writeTxnNodeRevision(java.io.OutputStream revNodeFile, FSRevisionNode revNode)
-
-
-
Field Detail
-
DB_DIR
public static final java.lang.String DB_DIR
- See Also:
- Constant Field Values
-
REVS_DIR
public static final java.lang.String REVS_DIR
- See Also:
- Constant Field Values
-
REPOS_FORMAT_FILE
public static final java.lang.String REPOS_FORMAT_FILE
- See Also:
- Constant Field Values
-
DB_FORMAT_FILE
public static final java.lang.String DB_FORMAT_FILE
- See Also:
- Constant Field Values
-
DB_LOGS_LOCK_FILE
public static final java.lang.String DB_LOGS_LOCK_FILE
- See Also:
- Constant Field Values
-
DB_LOCK_FILE
public static final java.lang.String DB_LOCK_FILE
- See Also:
- Constant Field Values
-
CURRENT_FILE
public static final java.lang.String CURRENT_FILE
- See Also:
- Constant Field Values
-
UUID_FILE
public static final java.lang.String UUID_FILE
- See Also:
- Constant Field Values
-
FS_TYPE_FILE
public static final java.lang.String FS_TYPE_FILE
- See Also:
- Constant Field Values
-
TXN_CURRENT_FILE
public static final java.lang.String TXN_CURRENT_FILE
- See Also:
- Constant Field Values
-
MIN_UNPACKED_REV_FILE
public static final java.lang.String MIN_UNPACKED_REV_FILE
- See Also:
- Constant Field Values
-
TXN_CURRENT_LOCK_FILE
public static final java.lang.String TXN_CURRENT_LOCK_FILE
- See Also:
- Constant Field Values
-
REVISION_PROPERTIES_DIR
public static final java.lang.String REVISION_PROPERTIES_DIR
- See Also:
- Constant Field Values
-
WRITE_LOCK_FILE
public static final java.lang.String WRITE_LOCK_FILE
- See Also:
- Constant Field Values
-
LOCKS_DIR
public static final java.lang.String LOCKS_DIR
- See Also:
- Constant Field Values
-
DAV_DIR
public static final java.lang.String DAV_DIR
- See Also:
- Constant Field Values
-
TRANSACTIONS_DIR
public static final java.lang.String TRANSACTIONS_DIR
- See Also:
- Constant Field Values
-
TRANSACTION_PROTOS_DIR
public static final java.lang.String TRANSACTION_PROTOS_DIR
- See Also:
- Constant Field Values
-
NODE_ORIGINS_DIR
public static final java.lang.String NODE_ORIGINS_DIR
- See Also:
- Constant Field Values
-
MANIFEST_FILE
public static final java.lang.String MANIFEST_FILE
- See Also:
- Constant Field Values
-
REP_CACHE_DB
public static final java.lang.String REP_CACHE_DB
- See Also:
- Constant Field Values
-
PACK_EXT
public static final java.lang.String PACK_EXT
- See Also:
- Constant Field Values
-
PACK_KIND_PACK
public static final java.lang.String PACK_KIND_PACK
- See Also:
- Constant Field Values
-
PACK_KIND_MANIFEST
public static final java.lang.String PACK_KIND_MANIFEST
- See Also:
- Constant Field Values
-
ENABLE_REP_SHARING_OPTION
public static final java.lang.String ENABLE_REP_SHARING_OPTION
- See Also:
- Constant Field Values
-
REP_SHARING_SECTION
public static final java.lang.String REP_SHARING_SECTION
- See Also:
- Constant Field Values
-
PACKED_REVPROPS_SECTION
public static final java.lang.String PACKED_REVPROPS_SECTION
- See Also:
- Constant Field Values
-
COMPRESS_PACKED_REVPROPS_OPTION
public static final java.lang.String COMPRESS_PACKED_REVPROPS_OPTION
- See Also:
- Constant Field Values
-
REVPROP_PACK_SIZE_OPTION
public static final java.lang.String REVPROP_PACK_SIZE_OPTION
- See Also:
- Constant Field Values
-
IO_SECTION
public static final java.lang.String IO_SECTION
- See Also:
- Constant Field Values
-
BLOCK_SIZE_OPTION
public static final java.lang.String BLOCK_SIZE_OPTION
- See Also:
- Constant Field Values
-
L2P_PAGE_SIZE_OPTION
public static final java.lang.String L2P_PAGE_SIZE_OPTION
- See Also:
- Constant Field Values
-
P2L_PAGE_SIZE_OPTION
public static final java.lang.String P2L_PAGE_SIZE_OPTION
- See Also:
- Constant Field Values
-
PATH_CONFIG
public static final java.lang.String PATH_CONFIG
- See Also:
- Constant Field Values
-
TXN_PATH_EXT
public static final java.lang.String TXN_PATH_EXT
- See Also:
- Constant Field Values
-
TXN_MERGEINFO_PATH
public static final java.lang.String TXN_MERGEINFO_PATH
- See Also:
- Constant Field Values
-
TXN_PATH_EXT_CHILDREN
public static final java.lang.String TXN_PATH_EXT_CHILDREN
- See Also:
- Constant Field Values
-
PATH_PREFIX_NODE
public static final java.lang.String PATH_PREFIX_NODE
- See Also:
- Constant Field Values
-
TXN_PATH_EXT_PROPS
public static final java.lang.String TXN_PATH_EXT_PROPS
- See Also:
- Constant Field Values
-
SVN_OPAQUE_LOCK_TOKEN
public static final java.lang.String SVN_OPAQUE_LOCK_TOKEN
- See Also:
- Constant Field Values
-
TXN_PATH_REV
public static final java.lang.String TXN_PATH_REV
- See Also:
- Constant Field Values
-
PATH_LOCK_KEY
public static final java.lang.String PATH_LOCK_KEY
- See Also:
- Constant Field Values
-
CHILDREN_LOCK_KEY
public static final java.lang.String CHILDREN_LOCK_KEY
- See Also:
- Constant Field Values
-
TOKEN_LOCK_KEY
public static final java.lang.String TOKEN_LOCK_KEY
- See Also:
- Constant Field Values
-
OWNER_LOCK_KEY
public static final java.lang.String OWNER_LOCK_KEY
- See Also:
- Constant Field Values
-
IS_DAV_COMMENT_LOCK_KEY
public static final java.lang.String IS_DAV_COMMENT_LOCK_KEY
- See Also:
- Constant Field Values
-
CREATION_DATE_LOCK_KEY
public static final java.lang.String CREATION_DATE_LOCK_KEY
- See Also:
- Constant Field Values
-
EXPIRATION_DATE_LOCK_KEY
public static final java.lang.String EXPIRATION_DATE_LOCK_KEY
- See Also:
- Constant Field Values
-
COMMENT_LOCK_KEY
public static final java.lang.String COMMENT_LOCK_KEY
- See Also:
- Constant Field Values
-
PRE_12_COMPAT_UNNEEDED_FILE_CONTENTS
public static final java.lang.String PRE_12_COMPAT_UNNEEDED_FILE_CONTENTS
- See Also:
- Constant Field Values
-
DIGEST_SUBDIR_LEN
public static final int DIGEST_SUBDIR_LEN
- See Also:
- Constant Field Values
-
REPOSITORY_FORMAT
public static final int REPOSITORY_FORMAT
- See Also:
- Constant Field Values
-
REPOSITORY_FORMAT_LEGACY
public static final int REPOSITORY_FORMAT_LEGACY
- See Also:
- Constant Field Values
-
DB_FORMAT_PRE_17
public static final int DB_FORMAT_PRE_17
- See Also:
- Constant Field Values
-
DB_FORMAT
public static final int DB_FORMAT
- See Also:
- Constant Field Values
-
DB_FORMAT_LOW
public static final int DB_FORMAT_LOW
- See Also:
- Constant Field Values
-
MIN_SVNDIFF1_FORMAT
public static final int MIN_SVNDIFF1_FORMAT
- See Also:
- Constant Field Values
-
LAYOUT_FORMAT_OPTION_MINIMAL_FORMAT
public static final int LAYOUT_FORMAT_OPTION_MINIMAL_FORMAT
- See Also:
- Constant Field Values
-
MIN_CURRENT_TXN_FORMAT
public static final int MIN_CURRENT_TXN_FORMAT
- See Also:
- Constant Field Values
-
MIN_PROTOREVS_DIR_FORMAT
public static final int MIN_PROTOREVS_DIR_FORMAT
- See Also:
- Constant Field Values
-
MIN_NO_GLOBAL_IDS_FORMAT
public static final int MIN_NO_GLOBAL_IDS_FORMAT
- See Also:
- Constant Field Values
-
MIN_MERGE_INFO_FORMAT
public static final int MIN_MERGE_INFO_FORMAT
- See Also:
- Constant Field Values
-
MIN_REP_SHARING_FORMAT
public static final int MIN_REP_SHARING_FORMAT
- See Also:
- Constant Field Values
-
MIN_PACKED_FORMAT
public static final int MIN_PACKED_FORMAT
- See Also:
- Constant Field Values
-
MIN_KIND_IN_CHANGED_FORMAT
public static final int MIN_KIND_IN_CHANGED_FORMAT
- See Also:
- Constant Field Values
-
MIN_PACKED_REVPROP_SQLITE_DEV_FORMAT
public static final int MIN_PACKED_REVPROP_SQLITE_DEV_FORMAT
- See Also:
- Constant Field Values
-
MIN_PACKED_REVPROP_FORMAT
public static final int MIN_PACKED_REVPROP_FORMAT
- See Also:
- Constant Field Values
-
MIN_LOG_ADDRESSING_MINIMAL_FORMAT
public static final int MIN_LOG_ADDRESSING_MINIMAL_FORMAT
- See Also:
- Constant Field Values
-
MIN_MERGEINFO_IN_CHANGED_FORMAT
public static final int MIN_MERGEINFO_IN_CHANGED_FORMAT
- See Also:
- Constant Field Values
-
DEFAULT_MAX_FILES_PER_DIRECTORY
private static long DEFAULT_MAX_FILES_PER_DIRECTORY
-
DB_TYPE
private static final java.lang.String DB_TYPE
- See Also:
- Constant Field Values
-
REVISION_PROPERTIES_DB
public static final java.lang.String REVISION_PROPERTIES_DB
- See Also:
- Constant Field Values
-
REVISION_PROPERTIES_TABLE
public static final java.lang.String REVISION_PROPERTIES_TABLE
- See Also:
- Constant Field Values
-
MIN_UNPACKED_REV
public static final java.lang.String MIN_UNPACKED_REV
- See Also:
- Constant Field Values
-
DB_FORMAT_PRE_17_USE_AS_DEFAULT
public static final boolean DB_FORMAT_PRE_17_USE_AS_DEFAULT
- See Also:
- Constant Field Values
-
myDBFormat
private int myDBFormat
-
myReposFormat
private int myReposFormat
-
myUUID
private java.lang.String myUUID
-
myFSType
private java.lang.String myFSType
-
myRepositoryRoot
private java.io.File myRepositoryRoot
-
myRevisionsRoot
private java.io.File myRevisionsRoot
-
myRevisionPropertiesRoot
private java.io.File myRevisionPropertiesRoot
-
myTransactionsRoot
private java.io.File myTransactionsRoot
-
myLocksRoot
private java.io.File myLocksRoot
-
myDBRoot
private java.io.File myDBRoot
-
myWriteLockFile
private java.io.File myWriteLockFile
-
myCurrentFile
private java.io.File myCurrentFile
-
myTransactionCurrentFile
private java.io.File myTransactionCurrentFile
-
myTransactionCurrentLockFile
private java.io.File myTransactionCurrentLockFile
-
myTransactionProtoRevsRoot
private java.io.File myTransactionProtoRevsRoot
-
myNodeOriginsDir
private java.io.File myNodeOriginsDir
-
myRepositoryFormatFile
private java.io.File myRepositoryFormatFile
-
myDBFormatFile
private java.io.File myDBFormatFile
-
myUUIDFile
private java.io.File myUUIDFile
-
myFSTypeFile
private java.io.File myFSTypeFile
-
myMinUnpackedRevFile
private java.io.File myMinUnpackedRevFile
-
myRepositoryCacheFile
private java.io.File myRepositoryCacheFile
-
myMaxFilesPerDirectory
private long myMaxFilesPerDirectory
-
myYoungestRevisionCache
private long myYoungestRevisionCache
-
myMinUnpackedRevision
private long myMinUnpackedRevision
-
myUseLogAddressing
private boolean myUseLogAddressing
-
myConfig
private SVNConfigFile myConfig
-
myReposCacheManager
private IFSRepresentationCacheManager myReposCacheManager
-
myMinUnpackedRevProp
private long myMinUnpackedRevProp
-
myIsHooksEnabled
private boolean myIsHooksEnabled
-
myCompressPackedRevprops
private boolean myCompressPackedRevprops
-
myIsRepSharingAllowed
private boolean myIsRepSharingAllowed
-
myRevpropPackSize
private long myRevpropPackSize
-
myBlockSize
private long myBlockSize
-
myL2PPageSize
private long myL2PPageSize
-
myP2LPageSize
private long myP2LPageSize
-
-
Method Detail
-
setHooksEnabled
public void setHooksEnabled(boolean enabled)
-
isHooksEnabled
public boolean isHooksEnabled()
-
getDBFormat
public int getDBFormat()
-
getMaxFilesPerDirectory
public long getMaxFilesPerDirectory()
-
getReposFormat
public int getReposFormat()
-
isUseLogAddressing
public boolean isUseLogAddressing()
-
open
public void open() throws SVNException
- Throws:
SVNException
-
close
public void close() throws SVNException
- Throws:
SVNException
-
openForRecovery
public void openForRecovery() throws SVNException
- Throws:
SVNException
-
openRoot
public void openRoot() throws SVNException
- Throws:
SVNException
-
openDB
public void openDB() throws SVNException
- Throws:
SVNException
-
verifyBlockSize
private void verifyBlockSize(long blockSize, long itemSize, java.lang.String name) throws SVNException
- Throws:
SVNException
-
getFSType
public java.lang.String getFSType() throws SVNException
- Throws:
SVNException
-
readDBFormat
public int readDBFormat() throws SVNException
- Throws:
SVNException
-
getUUID
public java.lang.String getUUID() throws SVNException
- Throws:
SVNException
-
getDBRoot
public java.io.File getDBRoot()
-
getWriteLockFile
public java.io.File getWriteLockFile()
-
getUUIDFile
public java.io.File getUUIDFile()
-
getDBRevsDir
public java.io.File getDBRevsDir()
-
getDBLocksDir
public java.io.File getDBLocksDir()
-
getFSTypeFile
public java.io.File getFSTypeFile()
-
getTransactionsParentDir
public java.io.File getTransactionsParentDir()
-
getRepositoryRoot
public java.io.File getRepositoryRoot()
-
getRevisionPropertiesRoot
public java.io.File getRevisionPropertiesRoot()
-
getRepositoryFormatFile
public java.io.File getRepositoryFormatFile()
-
getDBFormatFile
public java.io.File getDBFormatFile()
-
getNodeOriginsDir
public java.io.File getNodeOriginsDir()
-
getCurrentFile
public java.io.File getCurrentFile()
-
getRepositoryCacheFile
public java.io.File getRepositoryCacheFile()
-
getDBLogsLockFile
public java.io.File getDBLogsLockFile() throws SVNException
- Throws:
SVNException
-
getDatedRevision
public long getDatedRevision(java.util.Date date) throws SVNException
- Throws:
SVNException
-
getYoungestRevision
public long getYoungestRevision() throws SVNException
- Throws:
SVNException
-
getMinUnpackedRev
public long getMinUnpackedRev() throws SVNException
- Throws:
SVNException
-
upgrade
public void upgrade() throws SVNException
- Throws:
SVNException
-
writeDBFormat
public void writeDBFormat(int format, long maxFilesPerDir, boolean overwrite) throws SVNException
- Throws:
SVNException
-
getRevisionProperties
public SVNProperties getRevisionProperties(long revision) throws SVNException
- Throws:
SVNException
-
readRevisionProperties
private SVNProperties readRevisionProperties(long revision) throws SVNException
- Throws:
SVNException
-
readPackedRevisionProperties
private SVNProperties readPackedRevisionProperties(long revision) throws SVNException
- Throws:
SVNException
-
getPackedRevPropFile
private java.io.File getPackedRevPropFile(long revision) throws SVNException
- Throws:
SVNException
-
decodeUncompressedSize
private static long decodeUncompressedSize(java.io.InputStream inputStream, int lengthRecordSize, int[] outputBytesRead) throws SVNException
- Throws:
SVNException
-
readProperties
private static SVNProperties readProperties(byte[] propsData) throws SVNException
- Throws:
SVNException
-
readNumber
private static long readNumber(java.io.BufferedReader reader) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
readNumber
private static long readNumber(java.io.InputStream inputStream) throws SVNException
- Throws:
SVNException
-
isPackedRevisionProperties
private boolean isPackedRevisionProperties(long revision)
-
createRevisionRoot
public FSRevisionRoot createRevisionRoot(long revision) throws SVNException
- Throws:
SVNException
-
createTransactionRoot
public FSTransactionRoot createTransactionRoot(FSTransactionInfo txn) throws SVNException
- Throws:
SVNException
-
openTxn
public FSTransactionInfo openTxn(java.lang.String txnName) throws SVNException
- Throws:
SVNException
-
getRevisionNode
public FSRevisionNode getRevisionNode(FSID id) throws SVNException
- Throws:
SVNException
-
getDirContents
public java.util.Map getDirContents(FSRevisionNode revNode) throws SVNException
- Throws:
SVNException
-
parseRawDeltaProperties
private byte[] parseRawDeltaProperties(FSRepresentation txtRep, java.lang.StringBuilder outputChecksum) throws SVNException
- Throws:
SVNException
-
applyDeltaFromFSFile
private byte[] applyDeltaFromFSFile(FSFile revisionFile, int deltaSize, java.io.InputStream baseStream, java.lang.StringBuilder outputChecksum) throws java.io.IOException, SVNException
- Throws:
java.io.IOException
SVNException
-
parseProperties
private SVNProperties parseProperties(FSRepresentation txtRep) throws SVNException
- Throws:
SVNException
-
getProperties
public SVNProperties getProperties(FSRevisionNode revNode) throws SVNException
- Throws:
SVNException
-
getNextRevisionIDs
public java.lang.String[] getNextRevisionIDs() throws SVNException
- Throws:
SVNException
-
getAndIncrementTxnKey
public java.lang.String getAndIncrementTxnKey() throws SVNException
- Throws:
SVNException
-
listTransactions
public java.util.Map listTransactions()
-
getNewRevisionFile
public java.io.File getNewRevisionFile(long newRevision)
-
getNewRevisionPropertiesFile
public java.io.File getNewRevisionPropertiesFile(long newRevision)
-
getTransactionDir
public java.io.File getTransactionDir(java.lang.String txnID)
-
setYoungestRevisionCache
public void setYoungestRevisionCache(long revision)
-
setUUID
public void setUUID(java.lang.String uuid) throws SVNException
- Throws:
SVNException
-
getRevisionPropertiesFile
public java.io.File getRevisionPropertiesFile(long revision, boolean returnMissing) throws SVNException
- Throws:
SVNException
-
openAndSeekRepresentation
public FSFile openAndSeekRepresentation(FSRepresentation rep) throws SVNException
- Throws:
SVNException
-
getNextIDsFile
public java.io.File getNextIDsFile(java.lang.String txnID)
-
writeNextIDs
public void writeNextIDs(java.lang.String txnID, java.lang.String nodeID, java.lang.String copyID) throws SVNException
- Throws:
SVNException
-
changeTransactionProperties
public void changeTransactionProperties(java.lang.String txnId, SVNProperties txnProperties) throws SVNException
- Throws:
SVNException
-
setTransactionProperty
public void setTransactionProperty(java.lang.String txnID, java.lang.String name, SVNPropertyValue propertyValue) throws SVNException
- Throws:
SVNException
-
setRevisionProperty
public void setRevisionProperty(long revision, java.lang.String propertyName, SVNPropertyValue propertyValue) throws SVNException
- Throws:
SVNException
-
getRevPropPackSize
protected long getRevPropPackSize()
-
isRepSharingAllowed
public boolean isRepSharingAllowed()
-
getBlockSize
public long getBlockSize()
-
getL2PPageSize
public long getL2PPageSize()
-
getP2LPageSize
public long getP2LPageSize()
-
getTransactionProperties
public SVNProperties getTransactionProperties(java.lang.String txnID) throws SVNException
- Throws:
SVNException
-
getTransactionPropertiesFile
public java.io.File getTransactionPropertiesFile(java.lang.String txnID)
-
getTransactionProtoRevsDir
public java.io.File getTransactionProtoRevsDir()
-
getTransactionProtoRevFile
public java.io.File getTransactionProtoRevFile(java.lang.String txnID)
-
getTransactionProtoRevLockFile
public java.io.File getTransactionProtoRevLockFile(java.lang.String txnID)
-
purgeTxn
public void purgeTxn(java.lang.String txnID) throws SVNException
- Throws:
SVNException
-
createNewTxnNodeRevisionFromRevision
public void createNewTxnNodeRevisionFromRevision(java.lang.String txnID, FSRevisionNode sourceNode) throws SVNException
- Throws:
SVNException
-
putTxnRevisionNode
public void putTxnRevisionNode(FSID id, FSRevisionNode revNode) throws SVNException
- Throws:
SVNException
-
getTransactionRevNodeFile
public java.io.File getTransactionRevNodeFile(FSID id)
-
writeTxnNodeRevision
public void writeTxnNodeRevision(java.io.OutputStream revNodeFile, FSRevisionNode revNode) throws java.io.IOException
- Throws:
java.io.IOException
-
getLock
public SVNLock getLock(java.lang.String repositoryPath, boolean haveWriteLock, boolean throwError) throws SVNException
- Throws:
SVNException
-
deleteLock
public void deleteLock(SVNLock lock) throws SVNException
- Throws:
SVNException
-
walkDigestFiles
public void walkDigestFiles(java.io.File digestFile, ISVNLockHandler getLocksHandler, boolean haveWriteLock) throws SVNException
- Throws:
SVNException
-
getLockHelper
public SVNLock getLockHelper(java.lang.String repositoryPath, boolean haveWriteLock) throws SVNException
- Throws:
SVNException
-
fetchLockFromDigestFile
public SVNLock fetchLockFromDigestFile(java.io.File digestFile, java.lang.String repositoryPath, java.util.Collection children) throws SVNException
- Throws:
SVNException
-
getDigestFileFromRepositoryPath
public java.io.File getDigestFileFromRepositoryPath(java.lang.String repositoryPath) throws SVNException
- Throws:
SVNException
-
getDigestFromRepositoryPath
public java.lang.String getDigestFromRepositoryPath(java.lang.String repositoryPath) throws SVNException
- Throws:
SVNException
-
unlockPath
public void unlockPath(java.lang.String path, java.lang.String token, java.lang.String username, boolean breakLock, boolean enableHooks) throws SVNException
- Throws:
SVNException
-
lockPath
public SVNLock lockPath(java.lang.String path, java.lang.String token, java.lang.String username, java.lang.String comment, java.util.Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) throws SVNException
- Throws:
SVNException
-
compoundMetaProperties
public SVNProperties compoundMetaProperties(long revision) throws SVNException
- Throws:
SVNException
-
getDeletedRevision
public long getDeletedRevision(java.lang.String path, long startRev, long endRev) throws SVNException
- Throws:
SVNException
-
getPreviousLocation
public SVNLocationEntry getPreviousLocation(java.lang.String path, long revision, long[] appearedRevision) throws SVNException
- Throws:
SVNException
-
getNodeOrigin
public java.lang.String getNodeOrigin(java.lang.String nodeID) throws SVNException
- Throws:
SVNException
-
setNodeOrigin
public void setNodeOrigin(java.lang.String nodeID, FSID nodeRevisionID) throws SVNException
- Throws:
SVNException
-
supportsMergeInfo
public boolean supportsMergeInfo()
-
readOptions
public void readOptions(FSFile formatFile, int formatNumber) throws SVNException
- Throws:
SVNException
-
getRepositoryCacheManager
public IFSRepresentationCacheManager getRepositoryCacheManager()
-
findRepositoryRoot
public static java.io.File findRepositoryRoot(java.io.File path)
-
findRepositoryRoot
public static java.lang.String findRepositoryRoot(java.lang.String host, java.lang.String path)
-
getDefaultMaxFilesPerDirectory
public static long getDefaultMaxFilesPerDirectory()
-
setDefaultMaxFilesPerDirectory
public static void setDefaultMaxFilesPerDirectory(long maxFilesPerDirectory)
-
isPackedRevision
public boolean isPackedRevision(long revision)
-
getPackedBaseRevision
public long getPackedBaseRevision(long revision)
-
getNodeOriginFile
protected java.io.File getNodeOriginFile(java.lang.String nodeID)
-
getTransactionRevisionPrototypeFile
protected FSFile getTransactionRevisionPrototypeFile(java.lang.String txnID)
-
getTransactionChangesFile
protected FSFile getTransactionChangesFile(java.lang.String txnID)
-
getTransactionRevisionNodeChildrenFile
protected FSFile getTransactionRevisionNodeChildrenFile(FSID txnID)
-
getRevisionFSFile
protected FSFile getRevisionFSFile(long revision) throws SVNException
- Throws:
SVNException
-
getPackOrRevisionFSFile
protected FSFile getPackOrRevisionFSFile(long revision) throws SVNException
- Throws:
SVNException
-
getAbsoluteRevisionPath
protected java.io.File getAbsoluteRevisionPath(long revision) throws SVNException
- Throws:
SVNException
-
getTransactionRevisionNodePropertiesFile
protected FSFile getTransactionRevisionNodePropertiesFile(FSID id)
-
getPackedRevPath
protected java.io.File getPackedRevPath(long revision, java.lang.String kind) throws SVNException
- Throws:
SVNException
-
getPackedRevPropsShardPath
protected java.io.File getPackedRevPropsShardPath(long revision) throws SVNException
- Throws:
SVNException
-
getPackDir
protected java.io.File getPackDir(long revision)
-
getPackFile
protected java.io.File getPackFile(long revision)
-
getManifestFile
protected java.io.File getManifestFile(long revision)
-
getRevisionFile
protected java.io.File getRevisionFile(long revision) throws SVNException
- Throws:
SVNException
-
getMinUnpackedRevFile
protected java.io.File getMinUnpackedRevFile()
-
getTransactionCurrentFile
protected java.io.File getTransactionCurrentFile()
-
getTransactionCurrentLockFile
protected java.io.File getTransactionCurrentLockFile()
-
getConfigFile
public java.io.File getConfigFile()
-
writeCurrentFile
protected void writeCurrentFile(long revision, java.lang.String nextNodeID, java.lang.String nextCopyID) throws SVNException, java.io.IOException
- Throws:
SVNException
java.io.IOException
-
getPackedOffset
protected long getPackedOffset(long revision) throws SVNException
- Throws:
SVNException
-
loadConfig
private SVNConfigFile loadConfig()
-
ensureRevisionsExists
private void ensureRevisionsExists(long revision) throws SVNException
- Throws:
SVNException
-
getNodeOriginsFromFile
private SVNProperties getNodeOriginsFromFile(java.lang.String nodeID) throws SVNException
- Throws:
SVNException
-
unlock
private void unlock(java.lang.String path, java.lang.String token, java.lang.String username, boolean breakLock) throws SVNException
- Throws:
SVNException
-
lock
private SVNLock lock(java.lang.String path, java.lang.String token, java.lang.String username, java.lang.String comment, java.util.Date expirationDate, long currentRevision, boolean stealLock, boolean isDAVComment) throws SVNException
- Throws:
SVNException
-
setLock
private void setLock(SVNLock lock, boolean isDAVComment) throws SVNException
- Throws:
SVNException
-
ensureDirExists
private boolean ensureDirExists(java.io.File dir, boolean create)
-
writeDigestLockFile
private void writeDigestLockFile(SVNLock lock, java.util.Collection children, java.lang.String repositoryPath, boolean isDAVComment) throws SVNException
- Throws:
SVNException
-
openAndSeekTransaction
private FSFile openAndSeekTransaction(FSRepresentation rep) throws SVNException
- Throws:
SVNException
-
openAndSeekRevision
private FSFile openAndSeekRevision(long revision, long itemIndex) throws SVNException
- Throws:
SVNException
-
lookupOffsetInIndex
protected long lookupOffsetInIndex(FSFile file, long revision, long itemIndex) throws SVNException
- Throws:
SVNException
-
lookupOffsetInProtoIndex
protected long lookupOffsetInProtoIndex(FSFile file, java.lang.String txnId, long itemIndex) throws SVNException
- Throws:
SVNException
-
parsePlainRepresentation
private java.util.Map parsePlainRepresentation(SVNProperties entries, boolean mayContainNulls) throws SVNException
- Throws:
SVNException
-
parseRepEntryValue
private FSEntry parseRepEntryValue(java.lang.String name, java.lang.String value)
-
getRevisionTime
private java.util.Date getRevisionTime(long revision) throws SVNException
- Throws:
SVNException
-
isRepositoryRoot
private static boolean isRepositoryRoot(java.io.File candidatePath)
-
getRevisionPropertiesDbPath
public java.io.File getRevisionPropertiesDbPath()
-
getMinUnpackedRevPropPath
public java.io.File getMinUnpackedRevPropPath()
-
updateMinUnpackedRevProp
public void updateMinUnpackedRevProp() throws SVNException
- Throws:
SVNException
-
getMinUnpackedRevProp
public long getMinUnpackedRevProp() throws SVNException
- Throws:
SVNException
-
isCompressPackedRevprops
public boolean isCompressPackedRevprops()
-
-