Comment 1 by joe 23, Nov 8, 2010
More info: The old behavior was the new files alphabetically, followed by the changed files alphabetically. The new behavior is everything in somewhat random order. My preference would be that the new and changed files are merged into a single sort (if I get to vote), but the old behavior would be a lot better than random.
Comment 2 by Thomas Keller, Dec 28, 2010
Labels:
Milestone:1.0
Comment 3 by Richard Levitte, Jan 1, 2011
Looking at the code, I'm concluding that the order is by node_id... and the way the code currently looks, turning it to some kind of alphabetical order seems a bit difficult. To be honest, I'm not sure I see this as very high priority, and definitely not a show stopper for 1.0.
Labels:
Priority:Low
Priority:Medium
Comment 4 by Thomas Keller, Jan 1, 2011
I looked at the code myself a couple of days ago and yes, its not easy. The best I came up with was recording the individual diffs from the make_diff calls in dump_diffs in some std::multimap<path,diff>. multimap because we'd need to use the old path in this map for deleted nodes and the new path for renamed / added nodes, which of course makes problems for example in a case of a circular rename for a regular map. If I read the stl docs correctly, we'd get the ordering for free when we use the standard iterators afterwards to output the diffs in order. So I'd still like to see this in 1.0. Accepting and assigning to myself.
Status:
Accepted
Owner: tommyd
Owner: tommyd
Comment 5 by Richard Levitte, Jan 9, 2011
I've just had a second look at the code at hand, and am noticing that dump_headers uses cset order (basically, what write_cset gives) while dump_diffs uses roster order (which really is node number order, as I understand it). I'm thinking that the cset order used by dump_headers is a good thing, so the conclusion would be that we should have dump_diffs produce diffs in the same order, and therefore iterate over a cset. The trouble with that thought, I guess, is that there's no real mapping from a cset back to the nodes in a roster, a cset seems pretty disconnected. That would need to be solved, in other words...
Comment 6 by Thomas Keller, Jan 14, 2011
Fixed in rev e7de71b0f9fd6113f13b00eeddfdcd8aa57bcd78
Status:
Fixed
Sign in to reply to this comment.
Reported by joe 23, Nov 7, 2010