mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
added support for branches to log command
This commit is contained in:
@@ -281,6 +281,23 @@ public final class LogCommandBuilder
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Retrieves only changesets of the given branch.<br />
|
||||
* <b>Note:</b> This option is ignored if the underlying
|
||||
* {@link RepositoryService} does not support the {@link Command#BRANCHES}.
|
||||
*
|
||||
*
|
||||
* @param branch brnach to retrieve changesets from
|
||||
*
|
||||
* @return retrieves only changesets of the given branch
|
||||
*/
|
||||
public LogCommandBuilder setBranch(String branch)
|
||||
{
|
||||
request.setBranch(branch);
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disables the cache for changesets. This means that every {@link Changeset}
|
||||
* is directly retrieved from the {@link Repository}. <b>Note: </b> Disabling
|
||||
|
||||
@@ -81,7 +81,7 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
&& Objects.equal(endChangeset, other.endChangeset)
|
||||
&& Objects.equal(pagingStart, other.pagingStart)
|
||||
&& Objects.equal(pagingLimit, other.pagingLimit)
|
||||
&& Objects.equal(path, other.path);
|
||||
&& Objects.equal(path, other.path) && Objects.equal(branch, other.branch);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +94,7 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
public int hashCode()
|
||||
{
|
||||
return Objects.hashCode(startChangeset, endChangeset, pagingStart,
|
||||
pagingLimit, path);
|
||||
pagingLimit, path, branch);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -109,6 +109,7 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
pagingStart = 0;
|
||||
pagingLimit = 20;
|
||||
path = null;
|
||||
branch = null;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,12 +128,24 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
.add("pagingStart", pagingStart)
|
||||
.add("pagingLimit", pagingLimit)
|
||||
.add("path", path)
|
||||
.add("branch", branch)
|
||||
.toString();
|
||||
//J+
|
||||
}
|
||||
|
||||
//~--- set methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @param branch
|
||||
*/
|
||||
public void setBranch(String branch)
|
||||
{
|
||||
this.branch = branch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -190,6 +203,17 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
|
||||
//~--- get methods ----------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getBranch()
|
||||
{
|
||||
return branch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -258,6 +282,9 @@ public final class LogCommandRequest implements Serializable, Resetable
|
||||
|
||||
//~--- fields ---------------------------------------------------------------
|
||||
|
||||
/** Field description */
|
||||
private String branch;
|
||||
|
||||
/** Field description */
|
||||
private String endChangeset;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user