@Override public boolean isApplicable(SvnExport operation, SvnWcGeneration wcGeneration) throws SVNException { // remote source if (!operation.getSource().isLocal()) { return true; } return false; }
/** * Gets whether or not the operation has remote targets. * * @return <code>true</code> if the operation has remote targets, otherwise <code>false</code> */ public boolean hasRemoteTargets() { for (SvnTarget target : getTargets()) { if (!target.isLocal()) { return true; } } return false; }
/** * Gets whether or not the operation has local targets. * * @return <code>true</code> if the operation has local targets, otherwise <code>false</code> */ public boolean hasLocalTargets() { for (SvnTarget target : getTargets()) { if (target.isLocal()) { return true; } } return false; }
@Override public boolean isApplicable(SvnCopy operation, SvnWcGeneration wcGeneration) throws SVNException { return areAllSourcesLocal(operation) && operation.getFirstTarget().isLocal(); }
@Override public boolean isApplicable(SvnCopy operation, SvnWcGeneration wcGeneration) throws SVNException { return areAllSourcesRemote(operation) && operation.getFirstTarget().isLocal(); }
@Override public boolean isApplicable(SvnRemoteCopy operation, SvnWcGeneration wcGeneration) throws SVNException { return areAllSourcesRemote(operation) && !operation.getFirstTarget().isLocal(); }
@Override public boolean isApplicable(SvnRemoteCopy operation, SvnWcGeneration wcGeneration) throws SVNException { return areAllSourcesLocal(operation) && !operation.getFirstTarget().isLocal(); }
@Override protected File getOperationalWorkingCopy() { SvnCopySource firstSource = getSources().iterator().next(); if (firstSource.getSource().isLocal()) { return firstSource.getSource().getFile(); } return null; } }
@Override protected File getOperationalWorkingCopy() { if (getSource().isLocal()) { return getSource().getFile(); } return null; }
/** * Calculates whether <code>source</code> is local and <code>revision</code> is local. * * @return <code>true</code> if the <code>source</code> and <code>revision</code> are local, otherwise <code>false</code> */ public boolean isLocal() { return getSource().isLocal() && getRevision().isLocal(); }
@Override protected void ensureArgumentsAreValid() throws SVNException { if (getFirstTarget() == null || !getFirstTarget().isLocal()) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "Destination path is required for export."); SVNErrorManager.error(err, SVNLogType.WC); } if (getSource() == null) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.ILLEGAL_TARGET, "Source is required for export."); SVNErrorManager.error(err, SVNLogType.WC); } if (getDepth() == null || getDepth() == SVNDepth.UNKNOWN) { setDepth(SVNDepth.INFINITY); } if (getRevision() == SVNRevision.UNDEFINED) { setRevision(getSource().getResolvedPegRevision()); } super.ensureArgumentsAreValid(); }