Class SvnOldUpgrade
- java.lang.Object
-
- org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner<V,T>
-
- org.tmatesoft.svn.core.internal.wc2.SvnLocalOperationRunner<V,T>
-
- org.tmatesoft.svn.core.internal.wc2.old.SvnOldRunner<SvnWcGeneration,SvnUpgrade>
-
- org.tmatesoft.svn.core.internal.wc2.old.SvnOldUpgrade
-
- All Implemented Interfaces:
ISVNCanceller,ISVNEventHandler,ISvnOperationRunner<SvnWcGeneration,SvnUpgrade>
public class SvnOldUpgrade extends SvnOldRunner<SvnWcGeneration,SvnUpgrade>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classSvnOldUpgrade.RepositoryInfoclassSvnOldUpgrade.TextBaseFileInfoclassSvnOldUpgrade.TextBaseInfo
-
Field Summary
Fields Modifier and Type Field Description private SVNWCAccessaccessprivate static java.lang.StringADM_EMPTY_FILEprivate static java.lang.StringADM_LOCKprivate static java.lang.StringADM_LOGprivate static java.lang.StringADM_READMEprivate static java.lang.StringPRISTINE_STORAGE_RELPATHprivate static java.lang.StringPROP_BASE_FOR_DIRprivate static java.lang.StringPROP_BASE_SUBDIRprivate static java.lang.StringPROP_REVERT_FOR_DIRprivate static java.lang.StringPROP_WORKING_FOR_DIRprivate static java.lang.StringPROPS_SUBDIRprivate static java.lang.StringSDB_FILEprivate static java.lang.StringSVN_WC__BASE_EXTprivate static java.lang.StringSVN_WC__REVERT_EXTprivate static java.lang.StringTEXT_BASE_SUBDIRprivate static java.lang.StringWCPROPS_ALL_DATAprivate static java.lang.StringWCPROPS_FNAME_FOR_DIRprivate static java.lang.StringWCPROPS_SUBDIR_FOR_FILES-
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
-
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler
UNKNOWN
-
-
Constructor Summary
Constructors Constructor Description SvnOldUpgrade()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static java.io.FilebuildLockfilePath(java.io.File dirAbsPath)private voidcheckIsOldWCRoot(java.io.File localAbsPath)private voidcreatePhysicalLock(java.io.File absPath)private voidensureReposInfo(SVNEntry entry, java.io.File localAbsPath, SvnOldUpgrade.RepositoryInfo lastRepositoryInfo, java.util.Map<SVNURL,java.lang.String> reposCache)private voidfetchReposInfo(SVNEntry entry, SvnOldUpgrade.RepositoryInfo lastRepositoryInfo)private static SVNURLgetCanonicalURL(SVNURL original)static SVNURLgetEntryCopyFromURL(SVNEntry entry)static SVNURLgetEntryRepositoryRootURL(SVNEntry entry)static SVNURLgetEntryURL(SVNEntry entry)private java.util.Set<java.io.File>getVersionedFiles(java.io.File parentRelPath, SVNSqlJetDb sDb, long wcId)static booleangetVersionedSubdirs(SVNWCAccess access, java.io.File localAbsPath, java.util.ArrayList<java.io.File> children, boolean isCalculateDoDeleteDir, boolean isSkipMissing)private SVNWCAccessgetWCAccess()private voidmigrateNodeProps(java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, java.lang.String name, int originalFormat, SVNAdminArea area)private voidmigrateProps(java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, int originalFormat, SVNAdminArea area)private SVNHashMapmigrateTextBases(java.io.File dirAbsPath, java.io.File newWcRootAbsPath, SVNWCDbRoot root)private static java.util.Map<java.lang.String,SVNEntry>readEntries(SVNWCAccess access, java.io.File localAbsPath)private intreadWorkingCopyFormat(java.io.File firstTarget)private java.io.FileremoveSuffix(java.io.File file, java.lang.String suffix)protected SvnWcGenerationrun()private SvnOldUpgradeEntries.WriteBatonupgradeToWcng(SvnOldUpgradeEntries.WriteBaton parentDirBaton, SVNWCDb db, java.io.File dirAbsPath, int oldFormat, ISVNWCDb.SVNWCDbUpgradeData data, java.util.Map<SVNURL,java.lang.String> reposCache, SvnOldUpgrade.RepositoryInfo reposInfo)private voidupgradeWorkingCopy(SvnOldUpgradeEntries.WriteBaton parentDirBaton, SVNWCDb db, java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, java.util.Map<SVNURL,java.lang.String> reposCache, SvnOldUpgrade.RepositoryInfo reposInfo)private voidwcUpgrade(java.io.File localAbsPath, SvnOldUpgrade.RepositoryInfo reposInfo)static voidwipeObsoleteFiles(java.io.File dirAbsPath)static voidwipePostUpgrade(SVNWCContext ctx, java.io.File dirAbsPath, boolean isWholeAdmin)-
Methods inherited from class org.tmatesoft.svn.core.internal.wc2.old.SvnOldRunner
getWcGeneration
-
Methods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnLocalOperationRunner
getFirstTarget, isApplicable, sleepForTimestamp
-
Methods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner
checkCancelled, getOperation, getWcContext, handleEvent, handleEvent, reset, run, setOperation, setWcContext
-
-
-
-
Field Detail
-
SVN_WC__BASE_EXT
private static final java.lang.String SVN_WC__BASE_EXT
- See Also:
- Constant Field Values
-
SVN_WC__REVERT_EXT
private static final java.lang.String SVN_WC__REVERT_EXT
- See Also:
- Constant Field Values
-
WCPROPS_SUBDIR_FOR_FILES
private static final java.lang.String WCPROPS_SUBDIR_FOR_FILES
- See Also:
- Constant Field Values
-
WCPROPS_FNAME_FOR_DIR
private static final java.lang.String WCPROPS_FNAME_FOR_DIR
- See Also:
- Constant Field Values
-
WCPROPS_ALL_DATA
private static final java.lang.String WCPROPS_ALL_DATA
- See Also:
- Constant Field Values
-
PROPS_SUBDIR
private static final java.lang.String PROPS_SUBDIR
- See Also:
- Constant Field Values
-
PROP_BASE_SUBDIR
private static final java.lang.String PROP_BASE_SUBDIR
- See Also:
- Constant Field Values
-
PROP_BASE_FOR_DIR
private static final java.lang.String PROP_BASE_FOR_DIR
- See Also:
- Constant Field Values
-
PROP_REVERT_FOR_DIR
private static final java.lang.String PROP_REVERT_FOR_DIR
- See Also:
- Constant Field Values
-
PROP_WORKING_FOR_DIR
private static final java.lang.String PROP_WORKING_FOR_DIR
- See Also:
- Constant Field Values
-
TEXT_BASE_SUBDIR
private static final java.lang.String TEXT_BASE_SUBDIR
- See Also:
- Constant Field Values
-
ADM_README
private static final java.lang.String ADM_README
- See Also:
- Constant Field Values
-
ADM_EMPTY_FILE
private static final java.lang.String ADM_EMPTY_FILE
- See Also:
- Constant Field Values
-
ADM_LOG
private static final java.lang.String ADM_LOG
- See Also:
- Constant Field Values
-
ADM_LOCK
private static final java.lang.String ADM_LOCK
- See Also:
- Constant Field Values
-
PRISTINE_STORAGE_RELPATH
private static final java.lang.String PRISTINE_STORAGE_RELPATH
- See Also:
- Constant Field Values
-
SDB_FILE
private static final java.lang.String SDB_FILE
- See Also:
- Constant Field Values
-
access
private SVNWCAccess access
-
-
Method Detail
-
getEntryRepositoryRootURL
public static SVNURL getEntryRepositoryRootURL(SVNEntry entry) throws SVNException
- Throws:
SVNException
-
getEntryURL
public static SVNURL getEntryURL(SVNEntry entry) throws SVNException
- Throws:
SVNException
-
getEntryCopyFromURL
public static SVNURL getEntryCopyFromURL(SVNEntry entry) throws SVNException
- Throws:
SVNException
-
getCanonicalURL
private static SVNURL getCanonicalURL(SVNURL original) throws SVNException
- Throws:
SVNException
-
getWCAccess
private SVNWCAccess getWCAccess()
-
run
protected SvnWcGeneration run() throws SVNException
- Specified by:
runin classSvnOperationRunner<SvnWcGeneration,SvnUpgrade>- Throws:
SVNException
-
readWorkingCopyFormat
private int readWorkingCopyFormat(java.io.File firstTarget) throws SVNException- Throws:
SVNException
-
checkIsOldWCRoot
private void checkIsOldWCRoot(java.io.File localAbsPath) throws SVNException- Throws:
SVNException
-
fetchReposInfo
private void fetchReposInfo(SVNEntry entry, SvnOldUpgrade.RepositoryInfo lastRepositoryInfo) throws SVNException
- Throws:
SVNException
-
ensureReposInfo
private void ensureReposInfo(SVNEntry entry, java.io.File localAbsPath, SvnOldUpgrade.RepositoryInfo lastRepositoryInfo, java.util.Map<SVNURL,java.lang.String> reposCache) throws SVNException
- Throws:
SVNException
-
wcUpgrade
private void wcUpgrade(java.io.File localAbsPath, SvnOldUpgrade.RepositoryInfo reposInfo) throws SVNException- Throws:
SVNException
-
upgradeWorkingCopy
private void upgradeWorkingCopy(SvnOldUpgradeEntries.WriteBaton parentDirBaton, SVNWCDb db, java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, java.util.Map<SVNURL,java.lang.String> reposCache, SvnOldUpgrade.RepositoryInfo reposInfo) throws SVNException
- Throws:
SVNException
-
upgradeToWcng
private SvnOldUpgradeEntries.WriteBaton upgradeToWcng(SvnOldUpgradeEntries.WriteBaton parentDirBaton, SVNWCDb db, java.io.File dirAbsPath, int oldFormat, ISVNWCDb.SVNWCDbUpgradeData data, java.util.Map<SVNURL,java.lang.String> reposCache, SvnOldUpgrade.RepositoryInfo reposInfo) throws SVNException
- Throws:
SVNException
-
migrateTextBases
private SVNHashMap migrateTextBases(java.io.File dirAbsPath, java.io.File newWcRootAbsPath, SVNWCDbRoot root) throws SVNException
- Throws:
SVNException
-
removeSuffix
private java.io.File removeSuffix(java.io.File file, java.lang.String suffix)
-
createPhysicalLock
private void createPhysicalLock(java.io.File absPath) throws SVNException- Throws:
SVNException
-
wipePostUpgrade
public static void wipePostUpgrade(SVNWCContext ctx, java.io.File dirAbsPath, boolean isWholeAdmin) throws SVNException
- Throws:
SVNException
-
wipeObsoleteFiles
public static void wipeObsoleteFiles(java.io.File dirAbsPath) throws SVNException- Throws:
SVNException
-
buildLockfilePath
private static java.io.File buildLockfilePath(java.io.File dirAbsPath)
-
readEntries
private static java.util.Map<java.lang.String,SVNEntry> readEntries(SVNWCAccess access, java.io.File localAbsPath) throws SVNException
- Throws:
SVNException
-
getVersionedSubdirs
public static boolean getVersionedSubdirs(SVNWCAccess access, java.io.File localAbsPath, java.util.ArrayList<java.io.File> children, boolean isCalculateDoDeleteDir, boolean isSkipMissing) throws SVNException
- Throws:
SVNException
-
getVersionedFiles
private java.util.Set<java.io.File> getVersionedFiles(java.io.File parentRelPath, SVNSqlJetDb sDb, long wcId) throws SVNException- Throws:
SVNException
-
migrateProps
private void migrateProps(java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, int originalFormat, SVNAdminArea area) throws SVNException- Throws:
SVNException
-
migrateNodeProps
private void migrateNodeProps(java.io.File dirAbsPath, ISVNWCDb.SVNWCDbUpgradeData data, java.lang.String name, int originalFormat, SVNAdminArea area) throws SVNException- Throws:
SVNException
-
-