80b5a920945f47a5c3ea734e09953e89b8e2862b
"review" link is generated from Gitweb's "h" and "hb" parameters. Those parameters can be either: (missing), "HEAD", "refs/heads/*", "refs/changes/*" or revision. Unfortunately, Gerrit returns "Application Error" in the first two cases and the results from third case are pretty much useless in Gitweb's context. This commit sets different queries for different hash values: - "#q,project:<project>,n,z" for (missing) / "HEAD", - "#q,project:<project>+branch:<branch>,n,z" for "refs/heads/<branch>", - "#change,<change>" for "refs/heads/*/<change>/*", - "#q,<revision>,n,z" for revisions. While there, move code responsible for adding "review" link before "$site/etc/gitweb_config.perl" is executed, so that site administrators would have a bit of control over this. Change-Id: I9c5e8601c3c387f26a35765eec6ef6b76b794c64 Signed-off-by: Piotr Sikora <piotr.sikora@frickle.com>
Description
RETIRED, Gerrit as used by OpenStack