@@ -459,52 +459,51 @@ private function process_svn_log_xml( $p_repo, $p_svnlog_xml ) {
459459 # files
460460 if (isset ($ t_entry ->paths ->path )){
461461 foreach ( $ t_entry ->paths ->path as $ t_path ) {
462- switch ( (string )$ t_path ['action ' ] ) {
463- case 'A ' : $ t_action = 'add ' ; break ;
464- case 'D ' : $ t_action = 'rm ' ; break ;
465- case 'M ' : $ t_action = 'mod ' ; break ;
466- case 'R ' : $ t_action = 'mv ' ; break ;
467- default : $ t_action = (string )$ t_path ['action ' ];
468- }
469-
470- $ t_file = new SourceFile ( $ t_changeset ->id , '' , (string )$ t_path , $ t_action );
471- $ t_changeset ->files [] = $ t_file ;
462+ switch ( (string )$ t_path ['action ' ] ) {
463+ case 'A ' : $ t_action = 'add ' ; break ;
464+ case 'D ' : $ t_action = 'rm ' ; break ;
465+ case 'M ' : $ t_action = 'mod ' ; break ;
466+ case 'R ' : $ t_action = 'mv ' ; break ;
467+ default : $ t_action = (string )$ t_path ['action ' ];
468+ }
472469
473- # Branch-checking
474- if ( is_blank ( $ t_changeset ->branch ) ) {
475- # Look for standard trunk/branches/tags information
476- if ( $ p_repo ->info ['standard_repo ' ] ) {
477- if ( preg_match ( '@/(?:(trunk)|(?:branches|tags)/([^/]+))@i ' , $ t_file ->filename , $ t_matches ) ) {
478- if ( !is_blank ( $ t_matches [1 ] ) ) {
479- $ t_changeset ->branch = $ t_matches [1 ];
480- } else {
481- $ t_changeset ->branch = $ t_matches [2 ];
470+ $ t_file = new SourceFile ( $ t_changeset ->id , '' , (string )$ t_path , $ t_action );
471+ $ t_changeset ->files [] = $ t_file ;
472+
473+ # Branch-checking
474+ if ( is_blank ( $ t_changeset ->branch ) ) {
475+ # Look for standard trunk/branches/tags information
476+ if ( $ p_repo ->info ['standard_repo ' ] ) {
477+ if ( preg_match ( '@/(?:(trunk)|(?:branches|tags)/([^/]+))@i ' , $ t_file ->filename , $ t_matches ) ) {
478+ if ( !is_blank ( $ t_matches [1 ] ) ) {
479+ $ t_changeset ->branch = $ t_matches [1 ];
480+ } else {
481+ $ t_changeset ->branch = $ t_matches [2 ];
482+ }
482483 }
483- }
484- } else {
485- # Look for non-standard trunk path
486- if ( !is_blank ( $ t_trunk_path ) && preg_match ( '@^/*( ' . $ t_trunk_path . ')@i ' , $ t_file ->filename , $ t_matches ) ) {
487- $ t_changeset ->branch = $ t_matches [1 ];
484+ } else {
485+ # Look for non-standard trunk path
486+ if ( !is_blank ( $ t_trunk_path ) && preg_match ( '@^/*( ' . $ t_trunk_path . ')@i ' , $ t_file ->filename , $ t_matches ) ) {
487+ $ t_changeset ->branch = $ t_matches [1 ];
488488
489- # Look for non-standard branch path
490- } else if ( !is_blank ( $ t_branch_path ) && preg_match ( '@^/*(?: ' . $ t_branch_path . ')/([^/]+)@i ' , $ t_file ->filename , $ t_matches ) ) {
491- $ t_changeset ->branch = $ t_matches [1 ];
489+ # Look for non-standard branch path
490+ } else if ( !is_blank ( $ t_branch_path ) && preg_match ( '@^/*(?: ' . $ t_branch_path . ')/([^/]+)@i ' , $ t_file ->filename , $ t_matches ) ) {
491+ $ t_changeset ->branch = $ t_matches [1 ];
492492
493- # Look for non-standard tag path
494- } else if ( !is_blank ( $ t_tag_path ) && preg_match ( '@^/*(?: ' . $ t_tag_path . ')/([^/]+)@i ' , $ t_file ->filename , $ t_matches ) ) {
495- $ t_changeset ->branch = $ t_matches [1 ];
493+ # Look for non-standard tag path
494+ } else if ( !is_blank ( $ t_tag_path ) && preg_match ( '@^/*(?: ' . $ t_tag_path . ')/([^/]+)@i ' , $ t_file ->filename , $ t_matches ) ) {
495+ $ t_changeset ->branch = $ t_matches [1 ];
496496
497- # Fall back to just using the root folder as the branch name
498- } else if ( !$ t_ignore_paths && preg_match ( '@/([^/]+)@ ' , $ t_file ->filename , $ t_matches ) ) {
499- $ t_changeset ->branch = $ t_matches [1 ];
497+ # Fall back to just using the root folder as the branch name
498+ } else if ( !$ t_ignore_paths && preg_match ( '@/([^/]+)@ ' , $ t_file ->filename , $ t_matches ) ) {
499+ $ t_changeset ->branch = $ t_matches [1 ];
500+ }
500501 }
501- }
502- } # end is_blank( $t_changeset->branch ) if
503- } # end files in revision ($t_path) foreach
502+ } # end is_blank( $t_changeset->branch ) if
503+ } # end files in revision ($t_path) foreach
504504 } else { # no file paths set
505- $ t_changeset ->branch = $ t_trunk_path ;
506- }
507-
505+ $ t_changeset ->branch = $ t_trunk_path ;
506+ }
508507
509508 # get the log message
510509 $ t_changeset ->message = (string )$ t_entry ->msg ;
0 commit comments