Commits

Sebastian Sdorra committed 79d25e6

added branches command to repository service

  • Participants
  • Parent commits 6902528

Comments (0)

Files changed (1)

scm-core/src/main/java/sonia/scm/repository/api/RepositoryService.java

   }
 
   /**
+   * 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.
    *
    * @return instance of {@link BrowseCommandBuilder}