Class WalkSorter


  • public class WalkSorter
    extends Object
    Helper to sort ChangeDatas based on RevWalk ordering.

    Split changes by project, and map each change to a single commit based on the latest patch set. The set of patch sets considered may be limited by calling includePatchSets(Iterable). Perform a standard RevWalk on each project repository, do an approximate topo sort, and record the order in which each change's commit is seen.

    Once an order within each project is determined, groups of changes are sorted based on the project name. This is slightly more stable than sorting on something like the commit or change timestamp, as it will not unexpectedly reorder large groups of changes on subsequent calls if one of the changes was updated.