dirstate.status() does not return sorted removed files
Patrick Mézard
patrick.mezard at gmail.com
Sun Jul 20 18:09:54 UTC 2008
Hello,
I have left a failing test-remove test in crew, I was not sure which way you prefered it fixed. localrepo.status() assumes dirstate.status() returns sorted lists which is wrong: dirstate.walk() returns entries in two separate iterations which breaks dirstate.status() expectations. So we can:
1- Document that dirstate.status() returns sorted lists, and force a sort on "removed" at the end of the call. This is efficient but fragile, it relies on dirstate.walk() being *almost* sorted except for "m" files.
2- Sort again everything in localrepo.status() as it was done before the refactorings. This is slower but reliable.
As usual I prefer [2] but I could understand we want [1] for performance reasons.
Matt, what's your opinion ?
--
Patrick Mézard
More information about the Mercurial-devel
mailing list