Bug 672293 - Wrong --xhtml option to highlight from gitweb
Summary: Wrong --xhtml option to highlight from gitweb
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: git
Version: 14
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Adam Tkac
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-24 18:23 UTC by Michael Cronenworth
Modified: 2013-04-30 23:48 UTC (History)
8 users (show)

Fixed In Version: git-1.7.4-1.fc14
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-02-02 19:25:07 UTC


Attachments (Terms of Use)
Fix highlight -xhtml option (609 bytes, patch)
2011-01-24 19:01 UTC, Jochen Schmitt
no flags Details | Diff
Patch to make gitweb compatible with highlight >= 3.1 (603 bytes, patch)
2011-01-26 16:19 UTC, Jochen Schmitt
no flags Details | Diff
Patch to make gitweb compatible with highlight >= 3.1 (613 bytes, patch)
2011-01-26 19:57 UTC, Jochen Schmitt
no flags Details | Diff

Description Michael Cronenworth 2011-01-24 18:23:31 UTC
Description of problem: The gitweb code in Fedora 14 is calling highlight with the argument "--xhtml" and highlight 3.1 does not support this.


Version-Release number of selected component (if applicable):
highlight-3.1-2.fc14.x86_64

How reproducible: Always


Steps to Reproduce:
1. Create git repo
2. Enable gitweb pointing to git repo.
3. Enable highlight support in getweb.
4. Click on a source file in gitweb to view it.
  
Actual results: "Reading blob failed"
[Mon Jan 24 18:16:15 2011] [error] [client foo] highlight: unrecognized option `--xhtml', referer: http://intranet/git/foo/bar.git/tree/refs/heads/master:/foo

Expected results: Rendered HTML page with source code.

Comment 1 Jochen Schmitt 2011-01-24 19:01:49 UTC
Created attachment 475020 [details]
Fix highlight -xhtml option

Patch for put proper -xhtml option to highlight

Comment 2 Jochen Schmitt 2011-01-26 16:19:19 UTC
Created attachment 475429 [details]
Patch to make gitweb compatible with highlight >= 3.1

After a talk with the upstream author of highlight I have modified the patch in the was, that -O xhml will be taken a options to specified the output format.

Comment 3 Todd Zullinger 2011-01-26 17:22:18 UTC
Does this work with older versions of highlight or if applied will gitweb only work with highlight >= 3.1?  I'm interesting to see if the patch is applicable to send upstream so others don't get have to find and solve the same problem.

Comment 4 Jochen Schmitt 2011-01-26 17:27:26 UTC
The patch is for highlight 3.1 and above.

Comment 5 Adam Tkac 2011-01-26 17:40:47 UTC
(In reply to comment #3)
> Does this work with older versions of highlight or if applied will gitweb only
> work with highlight >= 3.1?  I'm interesting to see if the patch is applicable
> to send upstream so others don't get have to find and solve the same problem.

I've already sent the patch to upstream.

Just for information I checked the older highlight and it seems it also accepts the -O option (per manpage):

$ rpm -q highlight
highlight-3.0-0.2.fc14.x86_64

Comment 6 Jochen Schmitt 2011-01-26 19:57:12 UTC
Created attachment 475474 [details]
Patch to make gitweb compatible with highlight >= 3.1

I have got an additional mail from the upstream author of highlight. He worte, that using of --out-format xhtml may be a better solution, because this is compatible to the 2.x and 3.x serieas of highlight.

The meaning of the shout option -O was changed in the past.

Comment 7 Adam Tkac 2011-01-27 11:54:43 UTC
(In reply to comment #6)
> Created attachment 475474 [details]
> Patch to make gitweb compatible with highlight >= 3.1
> 
> I have got an additional mail from the upstream author of highlight. He worte,
> that using of --out-format xhtml may be a better solution, because this is
> compatible to the 2.x and 3.x serieas of highlight.
> 
> The meaning of the shout option -O was changed in the past.

The "--out-format" is not supported in highlight 2.4.8.

As written in http://article.gmane.org/gmane.comp.version-control.git/165552 the only solution is to completely remove out format specification and rely on highlight that default format is HTML.

Comment 8 Fedora Update System 2011-01-31 11:16:04 UTC
git-1.7.4-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/git-1.7.4-1.fc14

Comment 9 Fedora Update System 2011-01-31 19:58:28 UTC
git-1.7.4-1.fc14 has been pushed to the Fedora 14 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update git'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/git-1.7.4-1.fc14

Comment 10 Michael Cronenworth 2011-02-02 03:01:20 UTC
gitweb works much better now.

To all involved: Thank you

Comment 11 Fedora Update System 2011-02-02 19:25:02 UTC
git-1.7.4-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.