added revision parameter to changeset client api

This commit is contained in:
Sebastian Sdorra
2011-11-15 21:44:29 +01:00
parent 90c232a17e
commit 0859191fef
3 changed files with 27 additions and 11 deletions

View File

@@ -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);
}

View File

@@ -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
*