Luca Milanesio 2531203895 Allow gitweb URLs to be passed unencoded for viewing.
Gerrit composes the viewer URL using information
about the project, branch, file or commit of the
target object to be displayed.

Context:
Typically viewers such as CGit and GitWeb do need
those parts to be encoded, including the '/' in
project names, for being correctly parsed.
However other viewers could instead require
unencoded URL (e.g. GitHub web based viewer).

This patch allows to disable the URL encoding for
allowing GitHub to be used as "gitweb custom viewer"
on top of Gerrit.

Example of GitHub configured as viewer:

[gitweb]
    type = custom
    url = https://github.com/
    project = ${project}
    revision = ${project}/commit/${commit}
    branch = ${project}/tree/${branch}
    fileHistory = ${project}/blog/${branch}/${file}
    linkName = GitHub
    urlEncode = false

Change-Id: Ief59de7eb19def60c5e765c4a495bcac00384d83
2013-10-11 13:08:21 +01:00
..
2013-09-26 23:12:55 -07:00