/** * {@inheritDoc} */ public EditScmResult edit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return edit( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return status( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return unedit( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public StatusScmResult status( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return status( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public UnEditScmResult unedit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return unedit( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public EditScmResult edit( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); return edit( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setString( CommandParameter.MESSAGE, message == null ? "" : message ); return remove( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setString( CommandParameter.FILE, filename ); return blame( repository.getProviderRepository(), fileSet, parameters ); }
public AddScmResult add( ScmRepository repository, ScmFileSet fileSet, CommandParameters parameters ) throws ScmException { login( repository, fileSet ); if ( parameters.getString( CommandParameter.BINARY , null ) == null ) { // TODO: binary may be dependant on particular files though // TODO: set boolean? parameters.setString( CommandParameter.BINARY, "false" ); } return add( repository.getProviderRepository(), fileSet, parameters ); }
@Override public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, CommandParameters commandParameters ) throws ScmException { login( repository, fileSet ); if ( scmVersion != null && commandParameters.getScmVersion( CommandParameter.SCM_VERSION, null ) == null ) { commandParameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion ); } return checkout( repository.getProviderRepository(), fileSet, commandParameters ); }
/** * {@inheritDoc} */ public RemoveScmResult remove( ScmRepository repository, ScmFileSet fileSet, String message ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setString( CommandParameter.MESSAGE, message == null ? "" : message ); return remove( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public BlameScmResult blame( ScmRepository repository, ScmFileSet fileSet, String filename ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setString( CommandParameter.FILE, filename ); return blame( repository.getProviderRepository(), fileSet, parameters ); }
private UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String datePattern, boolean runChangelog ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion ); parameters.setString( CommandParameter.CHANGELOG_DATE_PATTERN, datePattern ); parameters.setString( CommandParameter.RUN_CHANGELOG_WITH_UPDATE, String.valueOf( runChangelog ) ); return update( repository.getProviderRepository(), fileSet, parameters ); }
private void login( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { LoginScmResult result = login( repository.getProviderRepository(), fileSet, new CommandParameters() ); if ( !result.isSuccess() ) { throw new ScmException( "Can't login.\n" + result.getCommandOutput() ); } }
/** * {@inheritDoc} */ public ChangeLogScmResult changeLog( ChangeLogScmRequest request ) throws ScmException { final ScmRepository scmRepository = request.getScmRepository(); final ScmFileSet scmFileSet = request.getScmFileSet(); login( scmRepository, scmFileSet ); return changelog( scmRepository.getProviderRepository(), scmFileSet, request.getCommandParameters() ); }
private void login( ScmRepository repository, ScmFileSet fileSet ) throws ScmException { LoginScmResult result = login( repository.getProviderRepository(), fileSet, new CommandParameters() ); if ( !result.isSuccess() ) { throw new ScmException( "Can't login.\n" + result.getCommandOutput() ); } }
public BranchScmResult branch( ScmRepository repository, ScmFileSet fileSet, String branchName, ScmBranchParameters scmBranchParameters ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setString( CommandParameter.BRANCH_NAME, branchName ); parameters.setScmBranchParameters( CommandParameter.SCM_BRANCH_PARAMETERS, scmBranchParameters ); return branch( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String message ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion ); parameters.setString( CommandParameter.MESSAGE, message ); return checkin( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public ExportScmResult export( ScmRepository repository, ScmFileSet fileSet, ScmVersion scmVersion, String outputDirectory ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setScmVersion( CommandParameter.SCM_VERSION, scmVersion ); parameters.setString( CommandParameter.OUTPUT_DIRECTORY, outputDirectory ); return export( repository.getProviderRepository(), fileSet, parameters ); }
/** * {@inheritDoc} */ public DiffScmResult diff( ScmRepository repository, ScmFileSet fileSet, ScmVersion startVersion, ScmVersion endVersion ) throws ScmException { login( repository, fileSet ); CommandParameters parameters = new CommandParameters(); parameters.setScmVersion( CommandParameter.START_SCM_VERSION, startVersion ); parameters.setScmVersion( CommandParameter.END_SCM_VERSION, endVersion ); return diff( repository.getProviderRepository(), fileSet, parameters ); }