Notice: this is a static mirror for historical purposes.

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
239Source IntegrationWebSVNpublic2012-02-23 05:552012-02-23 07:00
ReporterAlain D'EURVEILHER 
Assigned To 
Product Version0.16 
Target VersionFixed in Version 
Summary239: Parenthesis in filename causes incorrect filename stored in the database
DescriptionSome of my branches name, tags name, etc.... have a parenthesis, such as for instance "20120113 - 3.1RC2 build(20120113) - Rev 5060".
Because of that parenthesis the following regexp in the process_svn_log 'partially fails':

# Changed paths
} elseif ( 2 == $t_state ) {
if ( preg_match( '/^\s+([a-zA-Z])\s+([^\(]+)(?: \(from [^\)]+\))?/', $t_line, $t_matches ) ) {

As a consequence, in the related changeset I only got a part of the full path of the modified files, stopping at the character just before the parenthesis.

Maybe this part of the code should be reviewed to allow this kind of specification. Maybe if we process the line twice, first by checking if it ends by "(from ...", then with the rest perform the regular expression without the [^\(]. Because anyway, we don't use at all $t_matches[3] matching the (from some/branch:rev) info.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
User avatar (337)
Alain D'EURVEILHER (reporter)
2012-02-23 07:00

I would suggest something like the following as a correction:

in the file SourceSVN.php, in the function process_svn_log, in the if where state equals 2, i would replace the line:
if ( preg_match( '/^\s+([a-zA-Z])\s+([^\(]+)(?: \(from [^\)]+\))?/', $t_line, $t_matches ) ) {

by something like:
if ( preg_match( '/^.+(\s\(from\s.+\)\s*)$/', $t_line, $t_copy_matches ) ) {
  $t_line = substr( $t_line, 0, -1*strlen( $t_copy_matches[1] ) );
if ( preg_match( '/^\s+([a-zA-Z])\s+(.+)/', $t_line, $t_matches ) ) {

- Issue History
Date Modified Username Field Change
2012-02-23 05:55 Alain D'EURVEILHER New Issue
2012-02-23 07:00 Alain D'EURVEILHER Note Added: 337

Copyright © 2000 - 2012 MantisBT Group
Time: 0.1158 seconds.
memory usage: 8,318 KB
Powered by Mantis Bugtracker

hosted with