Go to file
Piotr Sikora 80b5a92094 Fix "review" link in Gitweb integration.
"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>
2011-02-28 17:30:12 +00:00
2008-11-14 16:59:34 -08:00
2009-03-27 20:20:10 -07:00
2011-01-11 15:12:39 +01:00
Description
RETIRED, Gerrit as used by OpenStack
120 MiB