Add branch to changeset collections

Branch information is added to a changeset collection and therefore
removed from single changesets for git repositories. Mercurial
repositories now also set the default branch in changesets.
This commit is contained in:
René Pfeuffer
2018-09-26 13:19:38 +02:00
parent 538cd4fe72
commit 9f80840c43
16 changed files with 209 additions and 66 deletions

View File

@@ -132,7 +132,11 @@ public class HgLogCommand extends AbstractCommand implements LogCommand
List<Changeset> changesets = on(repository).rev(start + ":"
+ end).execute();
result = new ChangesetPagingResult(total, changesets);
if (request.getBranch() == null) {
result = new ChangesetPagingResult(total, changesets);
} else {
result = new ChangesetPagingResult(total, changesets, request.getBranch());
}
}
else
{

View File

@@ -216,10 +216,7 @@ public abstract class AbstractChangesetCommand extends AbstractCommand
String branch = in.textUpTo('\n');
if (!BRANCH_DEFAULT.equals(branch))
{
changeset.getBranches().add(branch);
}
changeset.getBranches().add(branch);
String p1 = readId(in, changeset, PROPERTY_PARENT1_REVISION);