[Codestriker-commits] CVS update: codestriker/lib/Codestriker/FileParser SubversionDiff.pm Unidiff
                
                Brought to you by:
                
                    sits
                    
                
            
            
        
        
        
    | 
      
      
      From: <si...@us...> - 2007-08-18 04:54:12
      
     | 
|   User: sits    
  Date: 07/08/17 21:54:08
  Modified:    .        CHANGELOG
               lib/Codestriker/FileParser SubversionDiff.pm UnidiffUtils.pm
  Log:
  * Workaround for invalid diff files generated by Subversion in a Chinese
    locale.  See http://marc.info/?l=subversion-users&m=118725115412403&w=3
    for more information.
  
  
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
  retrieving revision 1.212
  retrieving revision 1.213
  diff -u -r1.212 -r1.213
  --- CHANGELOG	18 Aug 2007 04:17:19 -0000	1.212
  +++ CHANGELOG	18 Aug 2007 04:54:08 -0000	1.213
  @@ -47,6 +47,10 @@
   
   * Handle topic text that starts with the UTF-8 BOM.
   
  +* Workaround for invalid diff files generated by Subversion in a Chinese
  +  locale.  See http://marc.info/?l=subversion-users&m=118725115412403&w=3
  +  for more information.
  +
   Version 1.9.3
   
   * The project list screen now displays for each project, the total
  
  
  
  
  
  Index: SubversionDiff.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/SubversionDiff.pm,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SubversionDiff.pm	28 Jun 2007 07:01:11 -0000	1.7
  +++ SubversionDiff.pm	18 Aug 2007 04:54:08 -0000	1.8
  @@ -42,7 +42,7 @@
   	# For SVN diffs, the start of the diff block is the Index line.
   	# For SVN look diffs, the start of the diff block contains the change type.
   	# Also check for presence of property set blocks.
  -	while ($line =~ /^Property changes on: .*$/o) {
  +	while ($line =~ /^.*Property changes on: .*$/o) {
   	    $line = <$fh>;
   	    return () unless defined $line &&
   		$line =~ /^___________________________________________________________________$/o;
  @@ -50,12 +50,12 @@
   	    # Keep reading until we either get to an Index: line, a property
   	    # block, an Added/Deleted/Modified lines or the end of file.
   	    while (defined $line &&
  -		   $line !~ /^Index:/o &&
  -		   $line !~ /^Added:/o &&
  -		   $line !~ /^Deleted:/o &&
  -		   $line !~ /^Modified:/o &&
  -		   $line !~ /^Copied:/o &&
  -		   $line !~ /^Property changes on:/o) {
  +		   $line !~ /^.*Index:/o &&
  +		   $line !~ /^.*Added:/o &&
  +		   $line !~ /^.*Deleted:/o &&
  +		   $line !~ /^.*Modified:/o &&
  +		   $line !~ /^.*Copied:/o &&
  +		   $line !~ /^.*Property changes on:/o) {
   		$line = <$fh>;
   	    }
   	    
  @@ -66,7 +66,7 @@
   	}
   
   	return () unless
  -	    $line =~ /^(Index|Added|Modified|Copied|Deleted): (.*)$/o;
  +	    $line =~ /^.*(Index|Added|Modified|Copied|Deleted): (.*)$/o;
   	$entry_type = $1;
   	$filename = $2;
   	$line = <$fh>;
  
  
  
  
  
  Index: UnidiffUtils.pm
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/UnidiffUtils.pm,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- UnidiffUtils.pm	14 Jul 2005 12:08:10 -0000	1.5
  +++ UnidiffUtils.pm	18 Aug 2007 04:54:08 -0000	1.6
  @@ -51,7 +51,7 @@
   		# read. Note Perforce diffs can contain empty lines.
   		if ($num_matched_old_lines >= $number_old_lines &&
   		    $num_matched_new_lines >= $number_new_lines) {
  -		    last unless $line =~ /^ /o || $line =~ /^$/o;
  +		    last unless $line =~ /^\s*$/o;
   		}
   		else {
   		    if ($line =~ /^\-/o) {
  
  
  
 |