Make gitweb url links customizable, add support for cgit

The gitweb.type variable can now be one of the following: "gitweb",
"cgit" or "custom", with suitable defaults for other variables
selected based on the preferred URL format for that gitweb type.

If gitweb.type = custom is used, then URL patterns must be defined
in the gerrit.config file:

  [gitweb]
    project = ${project}/summary
    revision = ${project}/commit/${commit}
    branch = ${project}/log/?h=${branch}

In a custom configuration, all 3 variables must be defined or gitweb
integration will be disabled.

Bug: issue 366
Bug: issue 371
Change-Id: Ic681af1300b9c7cbae1f0f0ce31a5272378feac6
Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shane Mc Cormack
2009-12-28 04:49:39 +00:00
committed by Shawn O. Pearce
parent 5f95a93f0f
commit 27868a42d9
11 changed files with 220 additions and 51 deletions

View File

@@ -16,7 +16,7 @@ package com.google.gerrit.server.mail;
import com.google.gerrit.reviewdb.Account;
import com.google.gerrit.server.GerritPersonIdent;
import com.google.gerrit.server.ParamertizedString;
import com.google.gerrit.common.data.ParamertizedString;
import com.google.gerrit.server.account.AccountCache;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.inject.Inject;