Hot Koehls
  • Email
  • Feedburner
  • Linkedin
  • Twitter
  • Home
  • About
  • Archives
  • Contact
  • Software
    • S3imple Backup
    • Twitter Feed Archiver
    • FileTime
    • Flickr API Demo
Search
Home» For techies » Display line numbers in WebSVN file detail view

Display line numbers in WebSVN file detail view

Posted by Frank - June 20, 2012 - For techies
1

WebSVN is an open source subversion repository browser written in PHP, offering a compelling alternative to the more obtuse ViewVC and the commercial Atlassian Fisheye.

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:

$this->geshi->set_tab_width($this->repConfig->getExpandTabsBy());

Create a new line and insert the following immediately after it:

$this->geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);

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.

One comment on “Display line numbers in WebSVN file detail view”

  1. Ed Sutton says:
    November 7, 2012 at 1:11 pm

    Thank you so much for sharing! I will investigate what else Geshi can do! I also wish to use WebSVN for code reviews and collaboration and your tip for displaying line numbers is a big help. Do you have any tips or direction for the following:

    Is there a way to make WebSVN display date of commit or last file change?

    Is there any way to send a WebSVN URL to a file with line number argument that would take you to the specified line number?

    Thanks again,

    -Ed

Cancel Reply

Categories

  • For entrepreneurs
  • For everyone
  • For techies

Latest Tweets

  • The PA Report - LucasArts' eulogy reminds us of the inhuman cost of game development http://t.co/vVjHkmr9YD
    April 9, 2013 - 2:46 pm
  • Pictures from a developer's life http://t.co/s75fBPTu4v
    April 5, 2013 - 11:44 am
  • Chuck+Norris http://t.co/awBqZ8gncS
    March 7, 2013 - 10:46 pm
  • Google Hacks http://t.co/ZIU2CHcoem
    March 3, 2013 - 1:08 am

Recent Comments

  • Rohitash on Automating SSH or SFTP in scripts
  • kgiFozzkjk on MySQL founder Michael Widenius concerned about sale to Oracle
  • purusjap on Jeff Atwood still wrong about PHP
  • OTHER FUNCTION on Get HTTP status code of cURL call in PHP
  • CounterSpace on Change timezone to GMT in Debian

Recent Posts

  • Display line numbers in WebSVN file detail view
  • It’s dangerous to go alone
  • Create Self-Signed Wildcard SSL Certificate
  • What comes after the yottabyte?
  • Write code like they do in Hollywood
(c) 2012 Frank Koehl. All Rights Reserved.
  • Contact Us
  • Sitemap