highlight extension

Paolo Berto pberto at jupiter-jazz.com
Thu Dec 4 12:44:00 CST 2008


Hey there,

Apologies in advance for the basic, and more web sysadmin, qeustion:

I'd like to understand how hgweb uses pygmentize.
On my (hosted) remote server, under an ad hoc user "mercurial", I  
locally installed mercurial (1.1) and everything works as expected, I  
can push/pull, and use hgwebdir.cgi perfectly.

I'd like to pygmentize the hgwebdir part and I then locally installed  
Pygments (latest version) aswell under the same user and properly  
setup the repository (and just to be sure also the global) hgrc files  
to use this extension. I run Python 2.4.4 btw.

My setup, where '~' stands for the 'mercurial' user's home, looks like:

   ~/lib/python/mercurial
   ~/lib/python/hgext
   ~/lib/python/Pygments.####.egg

   ~/bin/hg
   ~/bin/pygmentize

 From this account I can definitely run pygmentize and hg since PATH  
and PYTHONPATH are all properly set. However I don't see any text  
highlights.

I would like to understand what could be the reason since I fiddled  
with it for quite some time.

The webserver (apache) is not run by me, but my the root user (as I  
said I am on a hosted site and don't have root privileges), and I  
assume the webserver cannot run pygmentize.
I tried installing pygments also there (same setup ~/lib ~/bin) on the  
severadmin account (which has more priviledges than the mercurial  
user, but still it is not root) and properly set paths there aswell. I  
still se no pygmentization.


What does the webserver need to find and execute to properly do  
pygmentization?
Is a highlight.css file necessary? (it is not distributed with 1.1)

Note that on my local setup (laptop & workstation, not the remote  
server) I briefly tested pygmentization with hg serve and all works  
fine (ohere everything was installed system-wise as su).

So, if somebody can share some light I'd really appreciate.


Best,

Paolo


More information about the Mercurial mailing list