[Tickets #1919] NEW: SVN Log parsing of Author

bugs@bugs.horde.org bugs at bugs.horde.org
Thu May 5 13:21:41 PDT 2005


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=1919
-----------------------------------------------------------------------
 Ticket             | 1919
 Created By         | shimmanning at gmail.com
 Summary            | SVN Log parsing of Author
 Queue              | Horde Framework Packages
 State              | Unconfirmed
 Priority           | 1. Low
 Type               | Bug
 Owners             | 
-----------------------------------------------------------------------


shimmanning at gmail.com (2005-05-05 13:21) wrote:

trying to browse some SVN repositories with CHORA will only display the
directories and no the folders.  I have tracked this down to the 
lib/Horde/VC/svn.php file.

while trying to parse the svn change log for a file, there seems to be a
slight error in the regular expression around line 730
 if (preg_match('/^r([0-9]*) \| ([^ ]*) \| (.*) \(.*\) \| ([0-9]*)
lines?$/', $line, $matches)) {

If the author name contains a space this will not work.   
changing the expressio to read:

 if (preg_match('/^r([0-9]*) \| (.*) \| (.*) \(.*\) \| ([0-9]*) lines?$/',
$line, $matches)) 

will fix the problem.  (changed [^ ]* to .* )

This issue occurs if the repository does not have an Authors name (ie 'no
author') also.  

Strange how this has gone so long unchecked..




More information about the bugs mailing list