Make stale state computation configurable

This commit is contained in:
René Pfeuffer
2020-11-24 08:41:03 +01:00
parent 518a1118fc
commit 7a47e68707
8 changed files with 135 additions and 49 deletions

View File

@@ -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();
@@ -85,9 +78,6 @@ public class HgBranchesCommand extends AbstractCommand
} else {
return Branch.normalBranch(hgBranch.getName(), node, lastCommitDate);
}
}
});
return branches;
});
}
}