#72 files in diff reordered during topic creation

closed-fixed
nobody
None
5
2008-06-26
2008-06-26
Anonymous
No

my organization upgraded to a new version of codestriker a few months ago, and suddenly a critical behavior changed:

codestriker now seems to order the files in a diff package according to its own desires rather than the order a creator put them in. it's not really awful for small reviews of only a few files, but for larger projects it can be critical to have them appear in a logical order to make things easier on the reviewers. one could list the proper order to view them in on the properties page, but that's really dumb (no link, and the reviewers would have to go back and forth instead of just going down the page in order as they're accustomed).

codestriker cannot figure what a logical order for the files should be, and should absolutely not change the order from what the user created!

i went through the manual, and can't see any reference to the ordering, so i don't know how to make it go back to the old behavior.

reese@alcatel-lucent.com

Discussion

  • David Sitsky
    David Sitsky
    2008-06-26

    Logged In: YES
    user_id=208928
    Originator: NO

    Hi,

    Yes - the behaviour was changed some time ago - here is the email thread which introduced the change: http://www.mail-archive.com/codestriker-user@lists.sourceforge.net/msg00188.html.

    You can easily turn off the sorting by going to lib/Codestriker/FileParser/Parser.pm, and deleting or commenting out the following lines:

    # Sort the diff chunks by filename, then old linenumber.
    @diffs = sort { $a->{filename} cmp $b->{filename} ||
    $a->{old_linenumber} <=> $b->{old_linenumber} } @diffs;

    Apparently Subversion does weird re-orderings of the files returned.

    I'll introduce a new configuration variables in Codestriker.conf to control this. I'll sneak this in to 1.9.5.

    Cheers,
    David

     
  • David Sitsky
    David Sitsky
    2008-06-26

    Logged In: YES
    user_id=208928
    Originator: NO

    This has been changed now so that a configuration variable in codestriker.conf will control whether sorting is performed via the $sort_diffs_by_filename variable. By default it is disabled. This will be in 1.9.5, which should be released early next week all going well.

     
  • David Sitsky
    David Sitsky
    2008-06-26

    • status: open --> closed-fixed
     
  • David Sitsky
    David Sitsky
    2008-06-27

    Logged In: YES
    user_id=208928
    Originator: NO

    I've just posted 1.9.5-rc2 which includes this fix.