User: sits    
  Date: 08/06/26 14:52:23

  Modified:    .        CHANGELOG codestriker.conf
               lib/Codestriker/FileParser Parser.pm
  Log:
  * Introduced new configuration variable $sort_diffs_by_filename in
    codestriker.conf which indicates whether the diff chunks inside a
    topic should be ordered by filename.  Apparently Subversion can
    produce diff topics in some circumstances in arbitrary order,
    where using this setting would make sense.  Default is for this
    setting to disabled.
  
    Prompted by 
https://sourceforge.net/tracker/index.php?func=detail&aid=2003380&group_id=41136&atid=429860.
  
  
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/CHANGELOG,v
  retrieving revision 1.236
  retrieving revision 1.237
  diff -u -r1.236 -r1.237
  --- CHANGELOG 25 Jun 2008 07:27:12 -0000      1.236
  +++ CHANGELOG 26 Jun 2008 21:52:22 -0000      1.237
  @@ -65,6 +65,13 @@
     
   * Can now comment on any line of any file in the review, not just those
     that are a part of the diff file.  
  +  
  +* Introduced new configuration variable $sort_diffs_by_filename in
  +  codestriker.conf which indicates whether the diff chunks inside a
  +  topic should be ordered by filename.  Apparently Subversion can
  +  produce diff topics in some circumstances in arbitrary order,
  +  where using this setting would make sense.  Default is for this
  +  setting to disabled.
        
   Version 1.9.4
   
  
  
  
  
  
  Index: codestriker.conf
  ===================================================================
  RCS file: /cvsroot/codestriker/codestriker/codestriker.conf,v
  retrieving revision 1.98
  retrieving revision 1.99
  diff -u -r1.98 -r1.99
  --- codestriker.conf  23 Jun 2008 07:15:56 -0000      1.98
  +++ codestriker.conf  26 Jun 2008 21:52:23 -0000      1.99
  @@ -346,6 +346,13 @@
   # can be changed dynamically on the view topic screen.
   $default_tabwidth = 8;
   
  +# Indicate whether the diffs presented in a topic should be ordered by
  +# filename.  For some deployments, it is important that the order of the
  +# diffs are presented in the same order as it was in the file.  For other
  +# deployments, apparently Subversion can returns diffs in an arbitrary
  +# order, so setting this to '1' would be useful.
  +$sort_diffs_by_filename = 0;
  +
   # Bug database to update.  Currently, Bugzilla, Flyspray and TestDirector
   # are supported, but it is straight-forward to support other bug
   # databases.  To enable Bugzilla, set $bug_db to "bugzilla", and set
  
  
  
  
  
  Index: Parser.pm
  ===================================================================
  RCS file: 
/cvsroot/codestriker/codestriker/lib/Codestriker/FileParser/Parser.pm,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Parser.pm 18 Aug 2007 04:17:19 -0000      1.24
  +++ Parser.pm 26 Jun 2008 21:52:23 -0000      1.25
  @@ -172,9 +172,12 @@
       seek($fh, 0, 0) ||
        die "Unable to seek to the start of the temporary file. $!";
   
  -    # Sort the diff chunks by filename, then old linenumber.
  -    @diffs = sort { $a->{filename} cmp $b->{filename} ||
  -                 $a->{old_linenumber} <=> $b->{old_linenumber} } @diffs;
  +     if (defined $Codestriker::sort_diffs_by_filename &&
  +         $Codestriker::sort_diffs_by_filename) {
  +     # Sort the diff chunks by filename, then old linenumber.
  +     @diffs = sort { $a->{filename} cmp $b->{filename} ||
  +                         $a->{old_linenumber} <=> $b->{old_linenumber} } 
@diffs;
  +     }
   
       # Only include those files whose extension is not in
       # @Codestriker::exclude_file_types, provided it is defined.
  
  
  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Codestriker-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/codestriker-commits

Reply via email to