From 817d3e6750ec0c1d21385538a0103edb00f8d795 Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Tue, 10 Jul 2012 20:55:06 +0200 Subject: [PATCH] added branches command to repository service --- .../scm/repository/api/RepositoryService.java | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java index 9d243784db..ad07dbc5a0 100644 --- a/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java +++ b/scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java @@ -157,6 +157,25 @@ public final class RepositoryService implements Closeable repository, preProcessorUtil); } + /** + * The branches command list all repository branches. + * + * @return instance of {@link BranchesCommandBuilder} + * @throws CommandNotSupportedException if the command is not supported + * by the implementation of the repository service provider. + */ + public BranchesCommandBuilder getBranchesCommand() + { + if (logger.isDebugEnabled()) + { + logger.debug("create branches command for repository {}", + repository.getName()); + } + + return new BranchesCommandBuilder(cacheManager, + provider.getBranchesCommand(), repository); + } + /** * The browse command allows browsing of a repository. *