Class SvnNgWcToWcCopy
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.ng.SvnNgOperationRunner<java.lang.Void,SvnCopy>
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgWcToWcCopy
- All Implemented Interfaces:
ISVNCanceller,ISVNEventHandler,ISvnOperationRunner<java.lang.Void,SvnCopy>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classprivate static class -
Field Summary
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULLFields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler
UNKNOWN -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleanareAllSourcesLocal(SvnCopy operation) private voidcheckForDisjointCopyPossibility(SVNWCContext context, java.io.File nestedWC, java.io.File nestedWCParent) protected booleancopy(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) private booleancopy(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) private voidcopyBaseDataOfFile(SVNWCContext context, java.io.File source, java.io.File dst) private voidcopyPristineFiles(java.io.File sourceWc, java.io.File targetWc, boolean move) private SvnNgWcToWcCopy.CopyToTmpDircopyToTmpDir(java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File tmpDirAbsPath, boolean fileCopy, boolean unversioned) private voidcopyVersionedDirectory(SVNWCContext wcContext, java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File dstOpRootAbsPath, java.io.File tmpDirAbsPath, boolean metadataOnly, boolean isMove, boolean notify) private voidcopyVersionedFile(SVNWCContext wcContext, java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File dstOpRootAbsPath, java.io.File tmpDirAbsPath, boolean metadataOnly, boolean conflicted, boolean isMove, boolean notify) private booleandisjointCopy(SVNWCContext context, java.io.File nestedWC) The method performs "disjoint" copy (see SVNCopyClient#doCopy(File)) The algorithm is: 1.private java.io.FilegetAdminDirectory(java.io.File parentWC) private java.io.FilegetPristineDirectory(java.io.File workingCopyDirectory) private SvnStatusgetStatus(java.io.File interestingFile) private java.io.FilegetWCDbFile(java.io.File nestedWC) private booleanhasMetadataInParentWc(SVNWCDb wcdb, java.io.File nestedWC, java.io.File nestedWCParent) booleanisApplicable(SvnCopy operation, SvnWcGeneration wcGeneration) Returns whether this runner is applicable for the operation on concrete working copy generation (1.7 or 1.6)private booleanisLocalRevision(SVNRevision revision) private booleanmove(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> pairs) voidmove(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) private voidmoveWcDb(java.io.File sourceWc, java.io.File targetWc) private voidremoveAllConflictMarkers(ISVNWCDb db, java.io.File srcDirAbsPath, java.io.File wcDirAbsPath) private voidremoveNodeConflictMarkers(ISVNWCDb db, java.io.File srcAbsPath, java.io.File nodeAbsPath) private java.util.Map<java.lang.String,SVNPropertyValue> resolvePinnedExternals(java.util.Map<SvnTarget, java.util.List<SVNExternal>> externalsToPin, SvnNgWcToWcCopy.SvnCopyPair copyPair, SVNRepository svnRepository, SVNURL reposRootUrl) protected java.lang.Voidrun(SVNWCContext context) private booleanshouldCopyBaseData(SVNWCContext context, java.io.File source, boolean metadataOnly, ISVNWCDb.SVNWCDbStatus srcStatus) protected booleantryRun(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) private voidverifyPaths(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> copyPairs, boolean makeParents, boolean move) private booleanverifyPaths(SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, int copyPairsCount, boolean move) private voidverifyPathsExistenceForVirtualCopy(java.io.File source, java.io.File dst, SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, boolean move) Methods inherited from class org.tmatesoft.svn.core.internal.wc2.ng.SvnNgOperationRunner
deleteDeleteFiles, getRepositoryAccess, getWcGeneration, matchesChangelist, reset, run, setRepositoryAccessMethods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnLocalOperationRunner
getFirstTarget, sleepForTimestampMethods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner
checkCancelled, getOperation, getWcContext, handleEvent, handleEvent, run, setOperation, setWcContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
SvnNgWcToWcCopy
public SvnNgWcToWcCopy()
-
-
Method Details
-
isApplicable
Description copied from interface:ISvnOperationRunnerReturns whether this runner is applicable for the operation on concrete working copy generation (1.7 or 1.6)- Specified by:
isApplicablein interfaceISvnOperationRunner<java.lang.Void,SvnCopy> - Overrides:
isApplicablein classSvnLocalOperationRunner<java.lang.Void,SvnCopy> - Parameters:
operation- operation that needs runnerwcGeneration- working copy generation- Returns:
trueif the runner is applicable, otherwisefalse- Throws:
SVNException
-
areAllSourcesLocal
-
isLocalRevision
-
run
- Specified by:
runin classSvnNgOperationRunner<java.lang.Void,SvnCopy> - Throws:
SVNException
-
tryRun
protected boolean tryRun(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) throws SVNException - Throws:
SVNException
-
disjointCopy
The method performs "disjoint" copy (see SVNCopyClient#doCopy(File)) The algorithm is: 1. Create a fake working copy 2. Move wc.db from the nested working copy to the fake 3. Move all pristine files to the parent working copy 4. Perform metadata copying- Parameters:
context-nestedWC-- Returns:
- Throws:
SVNException
-
checkForDisjointCopyPossibility
private void checkForDisjointCopyPossibility(SVNWCContext context, java.io.File nestedWC, java.io.File nestedWCParent) throws SVNException - Throws:
SVNException
-
moveWcDb
- Throws:
SVNException
-
copyPristineFiles
private void copyPristineFiles(java.io.File sourceWc, java.io.File targetWc, boolean move) throws SVNException - Throws:
SVNException
-
getPristineDirectory
private java.io.File getPristineDirectory(java.io.File workingCopyDirectory) -
getWCDbFile
private java.io.File getWCDbFile(java.io.File nestedWC) -
getAdminDirectory
private java.io.File getAdminDirectory(java.io.File parentWC) -
hasMetadataInParentWc
private boolean hasMetadataInParentWc(SVNWCDb wcdb, java.io.File nestedWC, java.io.File nestedWCParent) throws SVNException - Throws:
SVNException
-
copy
private boolean copy(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) throws SVNException - Throws:
SVNException
-
resolvePinnedExternals
private java.util.Map<java.lang.String,SVNPropertyValue> resolvePinnedExternals(java.util.Map<SvnTarget, java.util.List<SVNExternal>> externalsToPin, SvnNgWcToWcCopy.SvnCopyPair copyPair, SVNRepository svnRepository, SVNURL reposRootUrl) throws SVNException- Throws:
SVNException
-
move
- Throws:
SVNException
-
verifyPaths
private void verifyPaths(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> copyPairs, boolean makeParents, boolean move) throws SVNException - Throws:
SVNException
-
verifyPaths
private boolean verifyPaths(SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, int copyPairsCount, boolean move) throws SVNException - Throws:
SVNException
-
verifyPathsExistenceForVirtualCopy
private void verifyPathsExistenceForVirtualCopy(java.io.File source, java.io.File dst, SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, boolean move) throws SVNException - Throws:
SVNException
-
getStatus
- Throws:
SVNException
-
move
public void move(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) throws SVNException - Throws:
SVNException
-
removeAllConflictMarkers
private void removeAllConflictMarkers(ISVNWCDb db, java.io.File srcDirAbsPath, java.io.File wcDirAbsPath) throws SVNException - Throws:
SVNException
-
removeNodeConflictMarkers
private void removeNodeConflictMarkers(ISVNWCDb db, java.io.File srcAbsPath, java.io.File nodeAbsPath) throws SVNException - Throws:
SVNException
-
copy
protected boolean copy(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) throws SVNException - Throws:
SVNException
-
shouldCopyBaseData
private boolean shouldCopyBaseData(SVNWCContext context, java.io.File source, boolean metadataOnly, ISVNWCDb.SVNWCDbStatus srcStatus) throws SVNException - Throws:
SVNException
-
copyBaseDataOfFile
private void copyBaseDataOfFile(SVNWCContext context, java.io.File source, java.io.File dst) throws SVNException - Throws:
SVNException
-
copyVersionedDirectory
private void copyVersionedDirectory(SVNWCContext wcContext, java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File dstOpRootAbsPath, java.io.File tmpDirAbsPath, boolean metadataOnly, boolean isMove, boolean notify) throws SVNException - Throws:
SVNException
-
copyVersionedFile
private void copyVersionedFile(SVNWCContext wcContext, java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File dstOpRootAbsPath, java.io.File tmpDirAbsPath, boolean metadataOnly, boolean conflicted, boolean isMove, boolean notify) throws SVNException - Throws:
SVNException
-
copyToTmpDir
private SvnNgWcToWcCopy.CopyToTmpDir copyToTmpDir(java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File tmpDirAbsPath, boolean fileCopy, boolean unversioned) throws SVNException - Throws:
SVNException
-