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<Void,SvnCopy>
org.tmatesoft.svn.core.internal.wc2.ng.SvnNgWcToWcCopy
- All Implemented Interfaces:
ISVNCanceller
,ISVNEventHandler
,ISvnOperationRunner<Void,
SvnCopy>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
-
Field Summary
Fields inherited from interface org.tmatesoft.svn.core.ISVNCanceller
NULL
Fields inherited from interface org.tmatesoft.svn.core.wc.ISVNEventHandler
UNKNOWN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
areAllSourcesLocal
(SvnCopy operation) private void
checkForDisjointCopyPossibility
(SVNWCContext context, File nestedWC, File nestedWCParent) protected boolean
copy
(SVNWCContext context, File source, File dst, boolean metadataOnly) private boolean
copy
(SVNWCContext context, Collection<SvnCopySource> sources, File target) private void
copyBaseDataOfFile
(SVNWCContext context, File source, File dst) private void
copyPristineFiles
(File sourceWc, File targetWc, boolean move) private SvnNgWcToWcCopy.CopyToTmpDir
copyToTmpDir
(File srcAbsPath, File dstAbsPath, File tmpDirAbsPath, boolean fileCopy, boolean unversioned) private void
copyVersionedDirectory
(SVNWCContext wcContext, File srcAbsPath, File dstAbsPath, File dstOpRootAbsPath, File tmpDirAbsPath, boolean metadataOnly, boolean isMove, boolean notify) private void
copyVersionedFile
(SVNWCContext wcContext, File srcAbsPath, File dstAbsPath, File dstOpRootAbsPath, File tmpDirAbsPath, boolean metadataOnly, boolean conflicted, boolean isMove, boolean notify) private boolean
disjointCopy
(SVNWCContext context, File nestedWC) The method performs "disjoint" copy (see SVNCopyClient#doCopy(File)) The algorithm is: 1.private File
getAdminDirectory
(File parentWC) private File
getPristineDirectory
(File workingCopyDirectory) private SvnStatus
private File
getWCDbFile
(File nestedWC) private boolean
hasMetadataInParentWc
(SVNWCDb wcdb, File nestedWC, File nestedWCParent) boolean
isApplicable
(SvnCopy operation, SvnWcGeneration wcGeneration) Returns whether this runner is applicable for the operation on concrete working copy generation (1.7 or 1.6)private boolean
isLocalRevision
(SVNRevision revision) private boolean
void
move
(SVNWCContext context, File source, File dst, boolean metadataOnly) private void
private void
removeAllConflictMarkers
(ISVNWCDb db, File srcDirAbsPath, File wcDirAbsPath) private void
removeNodeConflictMarkers
(ISVNWCDb db, File srcAbsPath, File nodeAbsPath) private Map<String,
SVNPropertyValue> resolvePinnedExternals
(Map<SvnTarget, List<SVNExternal>> externalsToPin, SvnNgWcToWcCopy.SvnCopyPair copyPair, SVNRepository svnRepository, SVNURL reposRootUrl) protected Void
run
(SVNWCContext context) private boolean
shouldCopyBaseData
(SVNWCContext context, File source, boolean metadataOnly, ISVNWCDb.SVNWCDbStatus srcStatus) protected boolean
tryRun
(SVNWCContext context, Collection<SvnCopySource> sources, File target) private void
verifyPaths
(Collection<SvnNgWcToWcCopy.SvnCopyPair> copyPairs, boolean makeParents, boolean move) private boolean
verifyPaths
(SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, int copyPairsCount, boolean move) private void
verifyPathsExistenceForVirtualCopy
(File source, 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, setRepositoryAccess
Methods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnLocalOperationRunner
getFirstTarget, sleepForTimestamp
Methods inherited from class org.tmatesoft.svn.core.internal.wc2.SvnOperationRunner
checkCancelled, getOperation, getWcContext, handleEvent, handleEvent, run, setOperation, setWcContext
-
Constructor Details
-
SvnNgWcToWcCopy
public SvnNgWcToWcCopy()
-
-
Method Details
-
isApplicable
Description copied from interface:ISvnOperationRunner
Returns whether this runner is applicable for the operation on concrete working copy generation (1.7 or 1.6)- Specified by:
isApplicable
in interfaceISvnOperationRunner<Void,
SvnCopy> - Overrides:
isApplicable
in classSvnLocalOperationRunner<Void,
SvnCopy> - Parameters:
operation
- operation that needs runnerwcGeneration
- working copy generation- Returns:
true
if the runner is applicable, otherwisefalse
- Throws:
SVNException
-
areAllSourcesLocal
-
isLocalRevision
-
run
- Specified by:
run
in classSvnNgOperationRunner<Void,
SvnCopy> - Throws:
SVNException
-
tryRun
protected boolean tryRun(SVNWCContext context, Collection<SvnCopySource> sources, 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, File nestedWC, File nestedWCParent) throws SVNException - Throws:
SVNException
-
moveWcDb
- Throws:
SVNException
-
copyPristineFiles
- Throws:
SVNException
-
getPristineDirectory
-
getWCDbFile
-
getAdminDirectory
-
hasMetadataInParentWc
private boolean hasMetadataInParentWc(SVNWCDb wcdb, File nestedWC, File nestedWCParent) throws SVNException - Throws:
SVNException
-
copy
private boolean copy(SVNWCContext context, Collection<SvnCopySource> sources, File target) throws SVNException - Throws:
SVNException
-
resolvePinnedExternals
private Map<String,SVNPropertyValue> resolvePinnedExternals(Map<SvnTarget, List<SVNExternal>> externalsToPin, SvnNgWcToWcCopy.SvnCopyPair copyPair, SVNRepository svnRepository, SVNURL reposRootUrl) throws SVNException- Throws:
SVNException
-
move
- Throws:
SVNException
-
verifyPaths
private void verifyPaths(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(File source, File dst, SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, boolean move) throws SVNException - Throws:
SVNException
-
getStatus
- Throws:
SVNException
-
move
public void move(SVNWCContext context, File source, File dst, boolean metadataOnly) throws SVNException - Throws:
SVNException
-
removeAllConflictMarkers
private void removeAllConflictMarkers(ISVNWCDb db, File srcDirAbsPath, File wcDirAbsPath) throws SVNException - Throws:
SVNException
-
removeNodeConflictMarkers
private void removeNodeConflictMarkers(ISVNWCDb db, File srcAbsPath, File nodeAbsPath) throws SVNException - Throws:
SVNException
-
copy
protected boolean copy(SVNWCContext context, File source, File dst, boolean metadataOnly) throws SVNException - Throws:
SVNException
-
shouldCopyBaseData
private boolean shouldCopyBaseData(SVNWCContext context, File source, boolean metadataOnly, ISVNWCDb.SVNWCDbStatus srcStatus) throws SVNException - Throws:
SVNException
-
copyBaseDataOfFile
- Throws:
SVNException
-
copyVersionedDirectory
private void copyVersionedDirectory(SVNWCContext wcContext, File srcAbsPath, File dstAbsPath, File dstOpRootAbsPath, File tmpDirAbsPath, boolean metadataOnly, boolean isMove, boolean notify) throws SVNException - Throws:
SVNException
-
copyVersionedFile
private void copyVersionedFile(SVNWCContext wcContext, File srcAbsPath, File dstAbsPath, File dstOpRootAbsPath, File tmpDirAbsPath, boolean metadataOnly, boolean conflicted, boolean isMove, boolean notify) throws SVNException - Throws:
SVNException
-
copyToTmpDir
private SvnNgWcToWcCopy.CopyToTmpDir copyToTmpDir(File srcAbsPath, File dstAbsPath, File tmpDirAbsPath, boolean fileCopy, boolean unversioned) throws SVNException - Throws:
SVNException
-