mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-08 14:35:45 +01:00
added revision parameter to changeset client api
This commit is contained in:
@@ -55,12 +55,14 @@ public interface ClientChangesetHandler
|
||||
* @return
|
||||
*/
|
||||
public ChangesetPagingResult getChangesets(int start, int limit);
|
||||
|
||||
|
||||
/**
|
||||
* @param path
|
||||
* @param revision
|
||||
* @param start
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public ChangesetPagingResult getChangesets(String path, int start, int limit);
|
||||
public ChangesetPagingResult getChangesets(String path, String revision,
|
||||
int start, int limit);
|
||||
}
|
||||
|
||||
@@ -248,12 +248,13 @@ public class ScmUrlProvider
|
||||
* @since 1.8
|
||||
*
|
||||
* @param path
|
||||
* @param revision
|
||||
* @param start
|
||||
* @param limit
|
||||
* @return
|
||||
*/
|
||||
public String getRepositoryChangesetUrl(String repositoryId, String path, int start,
|
||||
int limit)
|
||||
public String getRepositoryChangesetUrl(String repositoryId, String path,
|
||||
String revision, int start, int limit)
|
||||
{
|
||||
String url = MessageFormat.format(getResourceUrl(URLPATTERN_CHANGESETS),
|
||||
repositoryId);
|
||||
@@ -268,10 +269,19 @@ public class ScmUrlProvider
|
||||
if (limit > 0)
|
||||
{
|
||||
url = url.concat(s).concat("limit=").concat(String.valueOf(limit));
|
||||
s = "&";
|
||||
}
|
||||
|
||||
if (path != null) {
|
||||
|
||||
if (path != null)
|
||||
{
|
||||
url = url.concat(s).concat("path=").concat(path);
|
||||
s = "&";
|
||||
}
|
||||
|
||||
if (revision != null)
|
||||
{
|
||||
url = url.concat(s).concat("revision=").concat(revision);
|
||||
s = "&";
|
||||
}
|
||||
|
||||
return url;
|
||||
@@ -291,9 +301,9 @@ public class ScmUrlProvider
|
||||
public String getRepositoryChangesetUrl(String repositoryId, int start,
|
||||
int limit)
|
||||
{
|
||||
return getRepositoryChangesetUrl(repositoryId, null, start, limit);
|
||||
return getRepositoryChangesetUrl(repositoryId, null, null, start, limit);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user