Question

I would like to have syntax highlighting in hgweb.

For example, makes

http://jstock.hg.sourceforge.net/hgweb/jstock/jstock/file/7289237e7b67/src/org/yccheok/jstock/gui/AboutJDialog.java

looks like

http://jstock.cvs.sourceforge.net/viewvc/jstock/jstock/src/org/yccheok/jstock/gui/AboutJDialog.java?revision=1.36&view=markup

May I know how I can do so? I saw

https://sourceforge.net/apps/trac/sourceforge/wiki/Mercurial%20Web%20repository%20browser mentions Viewing the contents of a checked-in file (including raw or syntax-highlighted outputs)..

May I know how?

Was it helpful?

Solution

you can enable the syntax-highlighting via mime-type setting. I have done this with svn via setting the svn property svn:mime-type for files: xml to text/xml java to text/x-java

Next check in the files and the syntax should be highlighted.

For other scm tools please check there manual, how to set the mime-type for check in.

I hope it is helpful to you.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top