mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-03-06 12:20:56 +01:00
Merge branch 'develop' into feature/hg_hooks_over_tcp
# Conflicts: # CHANGELOG.md
This commit is contained in:
@@ -27,7 +27,6 @@ package sonia.scm.repository.spi;
|
||||
//~--- non-JDK imports --------------------------------------------------------
|
||||
|
||||
import com.aragost.javahg.Changeset;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.collect.Lists;
|
||||
import sonia.scm.repository.Branch;
|
||||
|
||||
@@ -63,14 +62,8 @@ public class HgBranchesCommand extends AbstractCommand
|
||||
List<com.aragost.javahg.Branch> hgBranches =
|
||||
com.aragost.javahg.commands.BranchesCommand.on(open()).execute();
|
||||
|
||||
List<Branch> branches = Lists.transform(hgBranches,
|
||||
new Function<com.aragost.javahg.Branch,
|
||||
Branch>()
|
||||
{
|
||||
|
||||
@Override
|
||||
public Branch apply(com.aragost.javahg.Branch hgBranch)
|
||||
{
|
||||
return Lists.transform(hgBranches,
|
||||
hgBranch -> {
|
||||
String node = null;
|
||||
Changeset changeset = hgBranch.getBranchTip();
|
||||
|
||||
@@ -79,14 +72,12 @@ public class HgBranchesCommand extends AbstractCommand
|
||||
node = changeset.getNode();
|
||||
}
|
||||
|
||||
long lastCommitDate = changeset.getTimestamp().getDate().getTime();
|
||||
if (DEFAULT_BRANCH_NAME.equals(hgBranch.getName())) {
|
||||
return Branch.defaultBranch(hgBranch.getName(), node);
|
||||
return Branch.defaultBranch(hgBranch.getName(), node, lastCommitDate);
|
||||
} else {
|
||||
return Branch.normalBranch(hgBranch.getName(), node);
|
||||
return Branch.normalBranch(hgBranch.getName(), node, lastCommitDate);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return branches;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user