[ https://issues.apache.org/jira/browse/SCM-679?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17962524#comment-17962524 ]
ASF GitHub Bot commented on SCM-679: ------------------------------------ jira-importer commented on issue #886: URL: https://github.com/apache/maven-scm/issues/886#issuecomment-2964631280 **[Olivier Lamy](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=olamy)** commented Hi, Instead of adding more and more parameters (and new methods) what about changing to something like : ``` ChangeLogScmResult changeLog( ChangeLogScmRequest changeLogScmRequest ) throws ScmException; ``` Will be more easy to add features. WDYT ? > enhance scm api to support limited number of returned changesets by changelog > command > ------------------------------------------------------------------------------------- > > Key: SCM-679 > URL: https://issues.apache.org/jira/browse/SCM-679 > Project: Maven SCM (Moved to GitHub Issues) > Issue Type: New Feature > Components: maven-scm-api, maven-scm-provider-bazaar, > maven-scm-provider-gitexe, maven-scm-provider-mercurial (hg), > maven-scm-provider-svn > Affects Versions: 1.7, 1.8 > Reporter: Petr Kozelka > Assignee: Olivier Lamy > Priority: Major > Fix For: 1.8 > > Attachments: scm-changelog-limit-wrapped.patch, > scm-changelog-limit.patch > > > The current api returns changesets between specified/unspecified > dates/revisions. > This leaves some important usecases unsupported; some of them are: > - get last changeset on given repository/path > - get last n changesets there ("first page" when browsing changes) > The only workarround currently possible is, list all commits and filter them > - but this is very time consuming. > For this reason, I propose attached enhancement which overloads the changeLog > method, adding the limit parameter: > {code} > ChangeLogScmResult changeLog( ScmRepository repository, ScmFileSet > fileSet, Date startDate, Date endDate, > int numDays, ScmBranch branch, String > datePattern, Integer limit ) > throws ScmException; > {code} > For the "last changeset" usecase, the client sets limit = 1. > For "paged browsing", it can specify null startDate/endDate on firstPage, and > then work with dates for next/previous pages, still using the limit to > specify page size. > Note that the limit parameter can be null (as it is "Integer", not "int") to > specify unlimited number of returned changesets. > The suggested patch includes deprecations of enhanced methods, I hope this is > a good way to reduce the number of actively used overloaded variants of > "changelog" in future. -- This message was sent by Atlassian Jira (v8.20.10#820010)