Review Board

beta

Sort files in the diff intelligently

Submitted
Updated 1 year, 3 months ago

Christian Hammond Reviewers
trunk reviewboard
159
None Review Board SVN
Sorts files in the diff when a diff is being uploaded. The files are alphabetical, except we put header files before implementation files in order to ease reviews and give reviewers an overview of the structure before seeing the implementation.

We do this at diff creation time instead of view time. This means that existing diffs will retain their sorting, which is actually important because files contain index-based anchors and we don't want to break existing links.
Created a diff with several .c and .h files and saw that the order was as expected: alphabetical, but with .h files before .c files.
Ship it!
Posted 1 year, 3 months ago (July 29th, 2007, 1:22 a.m.)
Looks fine.