Monorail Project: gerrit Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 4909 Cannot open gitweb hyperlinks of project's history on project's access screen
Starred by 4 users Reported by gardenia...@gmail.com, Nov 10 2016 Back to list
Status: Submitted
Owner: ----
Closed: Dec 2016



Sign in to add a comment
*****************************************************************
*****                                                       *****
***** !!!! THIS BUG TRACKER IS FOR GERRIT CODE REVIEW !!!!  *****
*****                                                       *****
***** DO NOT SUBMIT BUGS FOR CHROME, ANDROID, CYANOGENMOD,  *****
***** INTERNAL ISSUES WITH YOUR COMPANY'S GERRIT SETUP, ETC.*****
*****                                                       *****
*****   THOSE ISSUES BELONG IN DIFFERENT ISSUE TRACKERS     *****
*****                                                       *****
*****************************************************************

Affected Version:2.13.2

What steps will reproduce the problem?
1.upgrade gerrit from 2.12.4 to 2.13.2
2.modify gerrit.config,add "type = gitweb" at section gitweb

[gitweb]
	cgi = /usr/local/httpd-2.4.4/htdocs/gitweb.cgi
	type = gitweb
3.start gerrit and view any project's acess,such as alps/test
4.click "gitweb"

What is the expected output?
open gitweb hyperlinks

What do you see instead?
Display "Not Found", and the gitweb hyperlinks' url is "http://192.168.56.101:8082/gitwebrefs/meta/config",not contain project info,gerrit-2.12.4 shows "http://192.168.56.101:8081/gitweb?p=alps/test.git;a=history;hb=refs/meta/config;f=project.config" in stead.

Please provide any additional information below.

 
Status: AwaitingInformation
Please try to add this in gerrit.config:

[gitweb]
  filehistory = ?p=\${project}\;a=history\;hb=\${branch}\;f=\${file}

Note that the previously mentioned setting should not actually be necessary; it should get set to that by default unless there is already a gitweb.filehistory setting in the gerrit.config.
after added that line into section gitweb, i failed in starting gerrit, the error message is beblow:

fatal: bad config line 97 in file /data/git/review_site-2.13.2/etc/gerrit.config

then i updated that line to 
filehistory = "?p=${project}.git;a=history;hb=${branch};f=${file}"

gerrit can start normally but still not open gitweb hyperlinks of project's acess. I doubt that gerrit doesn't use the configuration gitweb.filehistory
when gitweb.type is gitweb, there is no need to set gitweb.filehistory from Documentation/config-gerrit.html#gitweb, but it doesn't work well, please help to check it, thanks very much.
Hi, I have filehistory  set but the link is not working correctly.

I have it set like

[gitweb]
    url = https://phabricator.wikimedia.org
    type = custom
    revision = "/r/revision/${project};${commit}"
    project = /r/project/${project}
    branch = "/r/branch/${project};${branch}"
    filehistory = "/r/p/${project}/;history/${file}/;${branch}"
    file = "/r/p/${project}/;browse/HEAD/${file}/;${commit}"
    roottree = "/r/p/${project}/;browse/HEAD/;${commit}"
    linkname = diffusion
    linkDrafts = true
    urlEncode = false

but in gerrit 2.13 the link is displayed as https://phabricator.wikimedia.orgrefs/meta/config

in gerrit 2.12 it is displayed as https://phabricator.wikimedia.org/r/p/test/;history/refs/meta/config/project.config

gerrit 2.13 link http://gerrit-new.wmflabs.org/#/admin/projects/test,access

gerrit 2.12 link http://gerrit-test.wmflabs.org/gerrit/#/admin/projects/test,access



Comment 7 Deleted
Status: ChangeUnderReview
Moved to stable-2.13 as https://gerrit-review.googlesource.com/#/c/92645/
Labels: FixedIn-2.13.4
Status: Submitted
Sign in to add a comment