After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 605021 - Update to current cgit stable version
Update to current cgit stable version
Status: RESOLVED FIXED
Product: sysadmin
Classification: Infrastructure
Component: Git
unspecified
Other Windows
: Normal normal
: ---
Assigned To: GNOME Sysadmins
GNOME Sysadmins
Depends on:
Blocks:
 
 
Reported: 2009-12-19 20:59 UTC by Nelson Benitez
Modified: 2009-12-21 14:42 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nelson Benitez 2009-12-19 20:59:44 UTC
Hi, current cgit stable version is 0.8.3.1 , it would be good to upgrade for some features (highlighted source files, side by side diffs) but the feature I prefer is that it can link #bug_number in commit messages to the corresponding bugzilla link, so we dont have to copy paste the number and enter manually the url in the browser. Than is done implementing a commit-filter hook, like the following:

The setup:
$ grep filter /etc/cgitrc
commit-filter=/home/larsh/bin/cgit-commit-filter.sh

$ cat ~/bin/cgit-commit-filter.sh
#/bin/sh
sed -re 's|\b([0-9a-fA-F]{10,40})\b|<a href="./?id=\1">\1</a>|g'
Comment 1 Nelson Benitez 2009-12-19 21:09:06 UTC
It also highlights directories in the tree, see how it looks in http://hjemli.net/git/cgit/tree/?id=41934a3222cd3e5a5f214e4275929519c70d311d
Comment 2 Olav Vitters 2009-12-20 12:05:13 UTC
Upgraded git,cgit. No configuration changes made aside from the URL location.
Comment 3 Olav Vitters 2009-12-20 21:48:19 UTC
The tag was set wrongly, or something. Had to make a tar.bz2 myself. Upgraded cgit again.
Comment 4 Gabriel Burt 2009-12-21 02:22:26 UTC
See http://hjemli.net/git/cgit/tree/filters/syntax-highlighting.sh for instructions on turning on syntax highlighting.
Comment 5 Olav Vitters 2009-12-21 10:35:42 UTC
Added a commit-filer to do the GNOME Bugzilla links
Comment 6 Nelson Benitez 2009-12-21 11:24:13 UTC
Thanks Olav! now we have a better cgit.. about the commit-filter for bugzilla links, is working OK for "Bug 123456" strings but not for "#123456" strings, if you don't have time and post the commit-filter script I could try to help with that.

Thanks again!
Comment 7 Olav Vitters 2009-12-21 11:56:38 UTC
Not linking # is on purpose. I do not like it and bugzilla doesn't do it anyway.
Comment 8 Nelson Benitez 2009-12-21 12:08:49 UTC
What is the reasoning not linking # ? that way the feature is not complete because there are lots of commits like http://git.gnome.org/browse/nautilus/commit/?id=e487552287e5970dbbb39199b55026f2788bb42b and so we are again entering url's manually in the browser.
Comment 9 Olav Vitters 2009-12-21 12:29:19 UTC
Because Bugzilla doesn't do it. Using a sole # in commit messages vs 'bug' on Bugzilla is inconsistent.

The example you just gave has the text "bug #598931". That is something which is supported by Bugzilla. I've amended the script.
Comment 10 Nelson Benitez 2009-12-21 12:49:59 UTC
Ok, I suppose is good enough, thanks for working on this.
Comment 11 Olav Vitters 2009-12-21 14:42:34 UTC
Added syntax highlighting.