| Issue 493: | Repository viewer | |
| 40 people starred this issue and may be notified of changes. | Back to list |
Gerrit should include a repository viewer to browse through the source tree. This should be subject to the same access restrictions as viewing changesets etc.
Mar 12, 2010
#1
sop@google.com
Status:
AwaitingInformation
Mar 12, 2010
Not really. Code review invariably involves whole-file review. If Gerrit is a code review tool, it should allow proper whole-file review, which means a repository viewer. However, on practical grounds, gitweb has no authentication of it's own. While it may be possible, depending on setup, to use http auth, this is not desirable because it involves extra setup, and doesn't use Gerrit's own access restrictions. Note this is almost possible because Gerrit already allows viewing whole files in the side-by-side diff for changesets. However, this is insufficient because it doesn't allow (for example) viewing a file that didn't change in a particular changeset, or viewing the whole tree at a particular commit.
Mar 12, 2010
Oh heck. gitweb isn't fully documented, even in 2.1.2's docs. We have a CGI servlet which knows how to filter parameters for gitweb, and does access control checks before running it [1]. But I've also wanted a way to add any other file into a review, even though it wasn't modified by the user, so you can examine it. And if you add a comment, then it would show up as part of the review, but with a blank status or something else to indicate it wasn't modified, just commented on. This actually isn't hard, it just would take a bit of UI work to implement the file search inside of that file list popup dialog, or on the top level of the change page. [1] http://android.git.kernel.org/?p=tools/gerrit.git;a=tree;f=gerrit- httpd/src/main/java/com/google/gerrit/httpd/gitweb;h=ec0eaff8c6f75b1b132f5817d5558996 fac52337;hb=60cd31bce7f7846c156becf321e945eb08c65f45
Mar 12, 2010
Tangentially related is JGit bug 299886 [2], which asks for a servlet to provide a web based repository browser. I'm not sure if the JGit project would accept something based only on a GWT/AJAX UI. Ideally, if we actually add a full viewer, the effort gets put into JGit's feature and we can just reuse it here in Gerrit. [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=299886
Mar 12, 2010
So, this GCI servlet will provide a gitweb interface, but with Gerrit's access controls? That's something you'll want to document(!) - and as soon as you do, I'll give it a shot.
Mar 12, 2010
Documented [3]. [3] http://gerrit.googlecode.com/svn/documentation/2.1.2/config-gitweb.html
Status:
Started
Mar 12, 2010
Where does the configuration for gitweb come from? It doesn't look like it is using the main file - or at least some of is it being overwritten? This means I can't fix the following issues: *trying to load /gerrit/gitweb-default.css, but there is no such file. *same for logo *well, I can't change any settings at all if I can't find the config file it is using Some apache tweaks can get the first two working. Also, links point to /gitweb.cgi... (which is okish, I do have gitweb accessible there), but I guess there must be some way for them to point to /gerrit/gitweb.cgi? And yes, this will cover what I need - I'd resolve this as WORKSFORME but I don't see how.
Mar 13, 2010
The configuration file is generated by Gerrit and written out to a temporary file. Its in your system temporary directory as gitweb_config_*.perl. That may actually be a bug, some systems have /tmp cleaners that automatically remove files older than a week. The CGI is mounted as /gitweb within the Gerrit context. CSS and logo are /gitweb-default.css and /gitweb-logo.png. So these should all be accessible and served out of your Gerrit context. If they aren't, its a bug. Links should be going to /gitweb not /gitweb.cgi within the Gerrit context. So really on a page they should be "gitweb?..." as they are relative to the page displaying the web interface. Did you ensure gitweb.url is *NOT* set in your gerrit.config?
Status:
AwaitingInformation
Mar 13, 2010
CSS & logo aren't served up by the Jetty server. I made exemptions for them with ProxyPass and RedirectMatch so apache would grab them from my "real" gitweb install. I'll open a new bug for that shortly. Links on the page are going outside the Jetty version of gitweb & I don't see how to change that. I'll try playing with the temp config file, but unless there's a way to have persistent configuration for this, it won't be much use.
Apr 24, 2010
2.1.2.1 should have fixed most of the issues with gitweb serving resources... and it documented how to configure it. This issue is still open however because just using gitweb isn't really sufficient. We have to disable it in the presence of branch level access controls, but we really should still support a viewer even in that configuration.
Status:
Accepted
Dec 2, 2014
This is my biggest gripe with Gerrit. I seriously miss an integrated proper code browse tool, like e.g. "Grepcode"* with both a tree and "go to definition"-style links etc., and possibly "link out" to other projects, both internal, and to external tools like Grepcode to understand any libraries that are being called. If this was included as a part of Gerrit and the differ, it would make the reviewing process much better: Both more pleasant due to ability to understand the code better with better navigation and context, but also qualitatively better in that better availability of context and ease of understanding of the change in its setting would make the actual review quality better. * http://grepcode.com/file/repo1.maven.org/maven2/org.eclipse.jetty/jetty-server/9.2.2.v20140723/org/eclipse/jetty/server/Server.java?av=f
Aug 21, 2015
I think Gitiles serves this purpose fairly well now (especially as a plugin with full support for Gerrit ACLs).
Status:
Closed
Aug 21, 2015
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |