Gitweb links not working in polygerrit on 2.15rc3?

238 views
Skip to first unread message

Richard Christie

unread,
Mar 2, 2018, 12:45:09 PM3/2/18
to Repo and Gerrit Discussion
Hi

I have done a trial update to 2.15rc3 and have the following untouched gitweb config from earlier (2.13.9)

[gitweb]
        cgi = /work/gerrit/common/gitweb/gitweb.sh
        type = gitweb

Links all work fine from old (GWT) UI, but are all broken in the new UI. Polygerrit seems to be appending e.g.:

gitweb?p=test%2Fa-test.git;hb=refs%2Fchanges%2F02%2F54202%2F1;……

to the current URL rather than to the server base, so e.g. when clicking from a diff screen you get something like

<canonical-url>/c/<project>/+/<change>/<patchset>/<path>/gitweb?....

when what is wanted (and what GWT generates) is simply

<canonical-url>/gitweb?....

The same mistake happens from any other gitweb link anywhere else, e.g. the project browser area tries to do …/admin/gitweb?…, and the main change screen gitweb link is equally broken.

Is this a config error, or is anyone else seeing it? Or just a bug?

Gerrit is sitting behind an nginx reverse proxy, but I would have thought GWT would go wrong in that case as well if it were related.

Richard Christie

unread,
Apr 10, 2018, 10:42:23 AM4/10/18
to Repo and Gerrit Discussion
Since the above, I have now tried a plain 2.15.1 clean install using local H2 db, and notedb. No https, no reverse proxy. Just pure gerrit.

Added the following to <site>/etc/gerrit.config …

[gitweb]
        cgi = /absolute/path/to/gitweb/gitweb.cgi
        type = gitweb

… and observed the same behaviour. gitweb works fine in old UI and constantly has the wrong URI from polygerrit.

Does anyone else see this problem? Is anyone even using gitweb any more? I am presuming it is still considered supported since it is prominent in the documentation.

Logan Hanks

unread,
Apr 10, 2018, 12:43:32 PM4/10/18
to r.d.f.c...@gmail.com, Repo and Gerrit Discussion

--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

thomasmu...@yahoo.com

unread,
Apr 10, 2018, 12:52:59 PM4/10/18
to Repo and Gerrit Discussion
yes, this happened to us at wmf so we had to configure the url.

it appends the base url like /r/c/ or similar.

Richard Christie

unread,
Apr 11, 2018, 4:41:39 AM4/11/18
to Repo and Gerrit Discussion
Thanks, have raised Issue 8735
Reply all
Reply to author
Forward
0 new messages