Add context path to repository URL.

This commit is contained in:
takezoe
2013-04-19 16:34:23 +09:00
parent 7bfa88064d
commit c07a507bcb

View File

@@ -121,7 +121,7 @@ class RepositoryViewerServlet extends ServletBase {
def getRepositoryInfo(owner: String, repository: String): RepositoryInfo = {
val git = Git.open(getRepositoryDir(owner, repository))
RepositoryInfo(
owner, repository, "http://localhost:8080/git/%s/%s.git".format(owner, repository),
owner, repository, "http://localhost:8080%s/git/%s/%s.git".format(servletContext.getContextPath, owner, repository),
// branches
git.branchList.call.toArray.map { ref =>
ref.asInstanceOf[Ref].getName.replaceFirst("^refs/heads/", "")