// If it doesn't, check the parent, etc.
try
{
while ( target.length() > 0 && !scmProvider.list( scmRepository,
new ScmFileSet( new File( "." ), new File( target ) ),
false, makeScmVersion() ).isSuccess() )
{
stack.push( getFilename( target ) );
target = getDirname( target );
}
}
catch ( ScmException e )
{
fireTransferError( resource, e, TransferEvent.REQUEST_PUT );
throw new TransferFailedException( "Error listing repository: " + e.getMessage(), e );
}
// ok, we've established that target exists, or is empty.
// Check the resource out; if it doesn't exist, that means we're in the svn repo url root,
// and the configuration is incorrect. We will not try repo.getParent since most scm's don't
// implement that.
try
{
String repoUrl = getRepository().getUrl();
if ( "svn".equals( scmProvider.getScmType() ) )
{
// Subversion is the only SCM that adds path structure to represent tags and branches.
// The rest use scmVersion and scmVersionType.
repoUrl += "/" + target.replace( '\\', '/' );
}
scmRepository = getScmRepository( repoUrl );
CheckOutScmResult ret =
scmProvider.checkOut( scmRepository, new ScmFileSet( new File( checkoutDirectory, "" ) ),
makeScmVersion(), false );
checkScmResult( ret );
}
catch ( ScmException e )