[MERGE] walkdirs sort order
Denys Duchier
duchier at ps.uni-sb.de
Fri Jun 16 18:18:31 BST 2006
Robert Collins <robertc at robertcollins.net> writes:
> As a key, (dirname(path), path) works to pass my tests with an
> additional test for the case you have exposed.
by definition of lexicographic order:
(D1, D1/n1) << (D2, D2/n2) == (D1 < D2) | (D1=D2 & D1/n1<D2/n2)
by the same definition, we also have:
(D1, n1) << (D2, n2) == (D1 < D2) | (D1=D2 & n1<n2)
which is equivalent to the earlier definition. therefore, I suspect your key
can be simplified to be (dirname(path), basename(path)).
Am I getting this wrong?
Cheers,
--Denys
More information about the bazaar
mailing list