Display line numbers in WebSVN file detail view
June 20, 2012
By default, WebSVN does not display line numbers when looking at the contents of a single file (i.e. URL’s containing
filedetails.php). Fortunately, this is easily corrected if you enable Geshi syntax highlighting. It’s enabled by default, but double-check the contents of
include/config.php, making sure that the line
$config->useGeshi(); is present and not commented out.
With that done, open
include/svnlook.php and go to line 806, which looks like this:
Create a new line and insert the following immediately after it:
Save your changes and reload the file detail view, and Geshi should now display line numbers along the left-hand margin. With this simple change, I use WebSVN to effectively conduct group code reviews.
Note that WebSVN can still choose not to use Geshi if there’s no support for the language in question, in which case there won’t be any line numbers.