public class SvnNgWcToWcCopy extends SvnNgOperationRunner<java.lang.Void,SvnCopy>
Modifier and Type | Class and Description |
---|---|
private static class |
SvnNgWcToWcCopy.CopyToTmpDir |
private static class |
SvnNgWcToWcCopy.SvnCopyPair |
UNKNOWN
NULL
Constructor and Description |
---|
SvnNgWcToWcCopy() |
Modifier and Type | Method and Description |
---|---|
private boolean |
areAllSourcesLocal(SvnCopy operation) |
private void |
checkForDisjointCopyPossibility(SVNWCContext context,
java.io.File nestedWC,
java.io.File nestedWCParent) |
private boolean |
copy(SVNWCContext context,
java.util.Collection<SvnCopySource> sources,
java.io.File target) |
protected boolean |
copy(SVNWCContext context,
java.io.File source,
java.io.File dst,
boolean metadataOnly) |
private void |
copyBaseDataOfFile(SVNWCContext context,
java.io.File source,
java.io.File dst) |
private void |
copyPristineFiles(java.io.File sourceWc,
java.io.File targetWc,
boolean move) |
private SvnNgWcToWcCopy.CopyToTmpDir |
copyToTmpDir(java.io.File srcAbsPath,
java.io.File dstAbsPath,
java.io.File tmpDirAbsPath,
boolean fileCopy,
boolean unversioned) |
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) |
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) |
private boolean |
disjointCopy(SVNWCContext context,
java.io.File nestedWC)
The method performs "disjoint" copy (see SVNCopyClient#doCopy(File))
The algorithm is:
1.
|
private java.io.File |
getAdminDirectory(java.io.File parentWC) |
private java.io.File |
getPristineDirectory(java.io.File workingCopyDirectory) |
private SvnStatus |
getStatus(java.io.File interestingFile) |
private java.io.File |
getWCDbFile(java.io.File nestedWC) |
private boolean |
hasMetadataInParentWc(SVNWCDb wcdb,
java.io.File nestedWC,
java.io.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 |
move(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> pairs) |
void |
move(SVNWCContext context,
java.io.File source,
java.io.File dst,
boolean metadataOnly) |
private void |
moveWcDb(java.io.File sourceWc,
java.io.File targetWc) |
private void |
removeAllConflictMarkers(ISVNWCDb db,
java.io.File srcDirAbsPath,
java.io.File wcDirAbsPath) |
private void |
removeNodeConflictMarkers(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.Void |
run(SVNWCContext context) |
private boolean |
shouldCopyBaseData(SVNWCContext context,
java.io.File source,
boolean metadataOnly,
ISVNWCDb.SVNWCDbStatus srcStatus) |
protected boolean |
tryRun(SVNWCContext context,
java.util.Collection<SvnCopySource> sources,
java.io.File target) |
private void |
verifyPaths(java.util.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(java.io.File source,
java.io.File dst,
SVNFileType srcType,
SVNFileType dstType,
SvnNgWcToWcCopy.SvnCopyPair copyPair,
boolean move) |
deleteDeleteFiles, getRepositoryAccess, getWcGeneration, matchesChangelist, reset, run, setRepositoryAccess
getFirstTarget, sleepForTimestamp
checkCancelled, getOperation, getWcContext, handleEvent, handleEvent, run, setOperation, setWcContext
public boolean isApplicable(SvnCopy operation, SvnWcGeneration wcGeneration) throws SVNException
ISvnOperationRunner
isApplicable
in interface ISvnOperationRunner<java.lang.Void,SvnCopy>
isApplicable
in class SvnLocalOperationRunner<java.lang.Void,SvnCopy>
operation
- operation that needs runnerwcGeneration
- working copy generationtrue
if the runner is applicable, otherwise false
SVNException
private boolean areAllSourcesLocal(SvnCopy operation)
private boolean isLocalRevision(SVNRevision revision)
protected java.lang.Void run(SVNWCContext context) throws SVNException
run
in class SvnNgOperationRunner<java.lang.Void,SvnCopy>
SVNException
protected boolean tryRun(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) throws SVNException
SVNException
private boolean disjointCopy(SVNWCContext context, java.io.File nestedWC) throws SVNException
context
- nestedWC
- SVNException
private void checkForDisjointCopyPossibility(SVNWCContext context, java.io.File nestedWC, java.io.File nestedWCParent) throws SVNException
SVNException
private void moveWcDb(java.io.File sourceWc, java.io.File targetWc) throws SVNException
SVNException
private void copyPristineFiles(java.io.File sourceWc, java.io.File targetWc, boolean move) throws SVNException
SVNException
private java.io.File getPristineDirectory(java.io.File workingCopyDirectory)
private java.io.File getWCDbFile(java.io.File nestedWC)
private java.io.File getAdminDirectory(java.io.File parentWC)
private boolean hasMetadataInParentWc(SVNWCDb wcdb, java.io.File nestedWC, java.io.File nestedWCParent) throws SVNException
SVNException
private boolean copy(SVNWCContext context, java.util.Collection<SvnCopySource> sources, java.io.File target) throws SVNException
SVNException
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
SVNException
private boolean move(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> pairs) throws SVNException
SVNException
private void verifyPaths(java.util.Collection<SvnNgWcToWcCopy.SvnCopyPair> copyPairs, boolean makeParents, boolean move) throws SVNException
SVNException
private boolean verifyPaths(SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, int copyPairsCount, boolean move) throws SVNException
SVNException
private void verifyPathsExistenceForVirtualCopy(java.io.File source, java.io.File dst, SVNFileType srcType, SVNFileType dstType, SvnNgWcToWcCopy.SvnCopyPair copyPair, boolean move) throws SVNException
SVNException
private SvnStatus getStatus(java.io.File interestingFile) throws SVNException
SVNException
public void move(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) throws SVNException
SVNException
private void removeAllConflictMarkers(ISVNWCDb db, java.io.File srcDirAbsPath, java.io.File wcDirAbsPath) throws SVNException
SVNException
private void removeNodeConflictMarkers(ISVNWCDb db, java.io.File srcAbsPath, java.io.File nodeAbsPath) throws SVNException
SVNException
protected boolean copy(SVNWCContext context, java.io.File source, java.io.File dst, boolean metadataOnly) throws SVNException
SVNException
private boolean shouldCopyBaseData(SVNWCContext context, java.io.File source, boolean metadataOnly, ISVNWCDb.SVNWCDbStatus srcStatus) throws SVNException
SVNException
private void copyBaseDataOfFile(SVNWCContext context, java.io.File source, java.io.File dst) throws SVNException
SVNException
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
SVNException
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
SVNException
private SvnNgWcToWcCopy.CopyToTmpDir copyToTmpDir(java.io.File srcAbsPath, java.io.File dstAbsPath, java.io.File tmpDirAbsPath, boolean fileCopy, boolean unversioned) throws SVNException
SVNException