private Set<String> changesBetweenBranchs(String origine, String destination, Set<ScmFileStatus> statusToInclude, ScmRepository repository, File scmRoot) throws ScmException { ChangeLogScmRequest scmRequest = new ChangeLogScmRequest(repository, new ScmFileSet(scmRoot)); scmRequest.setScmBranch(new ScmBranch(destination + ".." + origine)); return pathsAffectedByChange(scmRequest, statusToInclude, NO_LIMIT); }
/** * {@inheritDoc} */ @Override public String translateBranchUrl( String url, String branchName, String branchBase ) { return SvnTagBranchUtils.resolveUrl( url, branchBase, SvnTagBranchUtils.SVN_BRANCHES, new ScmBranch( branchName ) ); }
/** * @deprecated */ private UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern, boolean runChangelog ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( tag ) ) { scmBranch = new ScmBranch( tag ); } return update( repository, fileSet, scmBranch, datePattern, runChangelog ); }
/** * {@inheritDoc} * * @deprecated */ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag, boolean recursive ) throws ScmException { ScmVersion scmVersion = null; if ( StringUtils.isNotEmpty( tag ) ) { scmVersion = new ScmBranch( tag ); } return checkOut( repository, fileSet, scmVersion, recursive ); }
/** * @deprecated */ private UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, String datePattern, boolean runChangelog ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( tag ) ) { scmBranch = new ScmBranch( tag ); } return update( repository, fileSet, scmBranch, datePattern, runChangelog ); }
/** * {@inheritDoc} * * @deprecated */ public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( branch ) ) { scmBranch = new ScmBranch( branch ); } return changeLog( repository, fileSet, startDate, endDate, numDays, scmBranch, null ); }
/** * {@inheritDoc} * * @deprecated */ public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String tag, String message ) throws ScmException { ScmVersion scmVersion = null; if ( StringUtils.isNotEmpty( tag ) ) { scmVersion = new ScmBranch( tag ); } return checkIn( repository, fileSet, scmVersion, message ); }
/** * {@inheritDoc} * * @deprecated */ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( tag ) ) { scmBranch = new ScmBranch( tag ); } return update( repository, fileSet, scmBranch, lastUpdate, datePattern ); }
/** * {@inheritDoc} * * @deprecated */ public CheckOutScmResult checkOut( ScmRepository repository, ScmFileSet fileSet, String tag, boolean recursive ) throws ScmException { ScmVersion scmVersion = null; if ( StringUtils.isNotEmpty( tag ) ) { scmVersion = new ScmBranch( tag ); } return checkOut( repository, fileSet, scmVersion, recursive ); }
/** * {@inheritDoc} * * @deprecated */ public UpdateScmResult update( ScmRepository repository, ScmFileSet fileSet, String tag, Date lastUpdate, String datePattern ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( tag ) ) { scmBranch = new ScmBranch( tag ); } return update( repository, fileSet, scmBranch, lastUpdate, datePattern ); }
/** * {@inheritDoc} * * @deprecated */ public ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet fileSet, Date startDate, Date endDate, int numDays, String branch, String datePattern ) throws ScmException { ScmBranch scmBranch = null; if ( StringUtils.isNotEmpty( branch ) ) { scmBranch = new ScmBranch( branch ); } return changeLog( repository, fileSet, startDate, endDate, numDays, scmBranch, null ); }
/** * {@inheritDoc} * * @deprecated */ public CheckInScmResult checkIn( ScmRepository repository, ScmFileSet fileSet, String tag, String message ) throws ScmException { ScmVersion scmVersion = null; if ( StringUtils.isNotEmpty( tag ) ) { scmVersion = new ScmBranch( tag ); } return checkIn( repository, fileSet, scmVersion, message ); }
public ScmVersion getScmVersion( String versionType, String version ) throws MojoExecutionException { if ( StringUtils.isEmpty( versionType ) && StringUtils.isNotEmpty( version ) ) { throw new MojoExecutionException( "You must specify the version type." ); } if ( StringUtils.isEmpty( version ) ) { return null; } if ( "branch".equals( versionType ) ) { return new ScmBranch( version ); } if ( "tag".equals( versionType ) ) { return new ScmTag( version ); } if ( "revision".equals( versionType ) ) { return new ScmRevision( version ); } throw new MojoExecutionException( "Unknown '" + versionType + "' version type." ); }
/** * Construct the ScmVersion to use for operations. * <p/> * <p>If scmVersion is supplied, scmVersionType must also be supplied to * take effect.</p> */ private ScmVersion makeScmVersion() { if ( StringUtils.isBlank( scmVersion ) ) { return null; } if ( scmVersion.length() > 0 ) { if ( "revision".equals( scmVersionType ) ) { return new ScmRevision( scmVersion ); } else if ( "tag".equals( scmVersionType ) ) { return new ScmTag( scmVersion ); } else if ( "branch".equals( scmVersionType ) ) { return new ScmBranch( scmVersion ); } } return null; }
private Set<String> changesBetweenBranchs(String origine, String destination, Set<ScmFileStatus> statusToInclude, ScmRepository repository, File scmRoot) throws ScmException { ChangeLogScmRequest scmRequest = new ChangeLogScmRequest(repository, new ScmFileSet(scmRoot)); scmRequest.setScmBranch(new ScmBranch(destination + ".." + origine)); return pathsAffectedByChange(scmRequest, statusToInclude, NO_LIMIT); }
if (!branch.equals(DEFAULT_BRANCH_NAME)) { getLog().debug("Updating from branch: " + branch); result = scmProvider.update( repository, new ScmFileSet( scmDirectory ), new ScmBranch( branch ) ); } else { getLog().debug("Updating from provider's chosen tag/branch/revision");
/** * Configure and perform the check-in process. * * @param scmProvider the SCM provider. * @param scmRepository the SCM repository. * @param msg the commit message. * * @throws ScmException */ private void checkIn(ScmProvider scmProvider, ScmRepository scmRepository, String msg) throws ScmException { CommandParameters parameters = new CommandParameters(); parameters.setScmVersion(CommandParameter.SCM_VERSION, new ScmBranch(siteBranch)); parameters.setString(CommandParameter.MESSAGE, msg); ScmResult result = (CheckInScmResult) executeCommand((GitExeScmProvider) scmProvider, new GitSiteCheckInCommand(), scmRepository.getProviderRepository(), new ScmFileSet(checkoutDirectory), parameters); checkScmResult(result); }
.changeLog( getScmRepository(), fileSet, timeBeforeSecond, currentTime, 0, new ScmBranch( "" ) );
new ScmBranch( branch ) );
new ScmBranch( branch ) );