-
Notifications
You must be signed in to change notification settings - Fork 174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SCM-948 - Make limit parameter work for svnexe and gitexe changelog goal #119
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,6 +39,9 @@ | |
import java.text.SimpleDateFormat; | ||
import java.util.Date; | ||
import java.util.TimeZone; | ||
import org.apache.maven.scm.CommandParameter; | ||
import org.apache.maven.scm.CommandParameters; | ||
import org.apache.maven.scm.ScmResult; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Emmanuel Venisse</a> | ||
|
@@ -51,7 +54,24 @@ public class GitChangeLogCommand | |
{ | ||
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss Z"; | ||
|
||
@Override | ||
public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, | ||
CommandParameters parameters ) | ||
throws ScmException | ||
{ | ||
return executeChangeLogCommand( repository, fileSet, | ||
parameters.getDate( CommandParameter.START_DATE, null ), | ||
parameters.getDate( CommandParameter.END_DATE, null ), | ||
(ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null ), | ||
parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null ), | ||
parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null ), | ||
parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null ), | ||
parameters.getInt( CommandParameter.LIMIT, -1 ), | ||
parameters.getScmVersion( CommandParameter.SCM_VERSION, null ) ); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, | ||
ScmVersion startVersion, ScmVersion endVersion, | ||
String datePattern ) | ||
|
@@ -61,6 +81,7 @@ protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo | |
} | ||
|
||
/** {@inheritDoc} */ | ||
@Override | ||
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, | ||
Date startDate, Date endDate, ScmBranch branch, | ||
String datePattern ) | ||
|
@@ -148,9 +169,21 @@ protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo | |
// ---------------------------------------------------------------------- | ||
|
||
/** | ||
* this constructs creates the commandline for the git-whatchanged command. | ||
* <p> | ||
* This method creates the commandline for the git-whatchanged command. | ||
* </p> | ||
* <p> | ||
* Since it uses --since and --until for the start and end date, the branch | ||
* and version parameters can be used simultanously. | ||
* </p> | ||
* @param repository Provider repositry to use. | ||
* @param workingDirectory Working copy directory. | ||
* @param branch Branch to run command on. | ||
* @param startDate Start date of log entries. | ||
* @param endDate End date of log entries. | ||
* @param startVersion Start version of log entries. | ||
* @param endVersion End version of log entries. | ||
* @return Command line. | ||
*/ | ||
public static Commandline createCommandLine( GitScmProviderRepository repository, File workingDirectory, | ||
ScmBranch branch, Date startDate, Date endDate, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,9 @@ | |
import java.util.Date; | ||
import java.util.Objects; | ||
import java.util.TimeZone; | ||
import org.apache.maven.scm.CommandParameter; | ||
import org.apache.maven.scm.CommandParameters; | ||
import org.apache.maven.scm.ScmResult; | ||
|
||
/** | ||
* @author <a href="mailto:[email protected]">Emmanuel Venisse</a> | ||
|
@@ -56,8 +59,24 @@ public class SvnChangeLogCommand | |
{ | ||
private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss Z"; | ||
|
||
@Override | ||
public ScmResult executeCommand( ScmProviderRepository repository, ScmFileSet fileSet, | ||
CommandParameters parameters ) | ||
throws ScmException | ||
{ | ||
return executeChangeLogCommand( repository, fileSet, | ||
parameters.getDate( CommandParameter.START_DATE, null ), | ||
parameters.getDate( CommandParameter.END_DATE, null ), | ||
(ScmBranch) parameters.getScmVersion( CommandParameter.BRANCH, null ), | ||
parameters.getString( CommandParameter.CHANGELOG_DATE_PATTERN, null ), | ||
parameters.getScmVersion( CommandParameter.START_SCM_VERSION, null ), | ||
parameters.getScmVersion( CommandParameter.END_SCM_VERSION, null ), | ||
parameters.getInt( CommandParameter.LIMIT, -1 ) ); | ||
} | ||
|
||
/** {@inheritDoc} */ | ||
@Deprecated | ||
@Override | ||
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, | ||
ScmVersion startVersion, ScmVersion endVersion, | ||
String datePattern ) | ||
|
@@ -68,6 +87,7 @@ protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo | |
|
||
/** {@inheritDoc} */ | ||
@Deprecated | ||
@Override | ||
protected ChangeLogScmResult executeChangeLogCommand( ScmProviderRepository repo, ScmFileSet fileSet, | ||
Date startDate, Date endDate, ScmBranch branch, | ||
String datePattern ) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This
<p>
isn't necessary.