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