Eric Kow <[EMAIL PROTECTED]> writes: > On Thu, Sep 18, 2008 at 17:28:34 +0400, Dmitry Kurochkin wrote: >> Could you explain this in more detail? In the test we pull patch with >> the same patchinfo as in the current repo. So in the end we get repo >> with two patches with the same patchinfo - that is tested with >> 'changes --count'. > > Oh actually I had misread your test, and now I understand that it's > two patches in the same repository. Then I guess my request is silly. > > For what it's worth, the 'wibble problem' is my attempt at demonstrating > that it is possible to get into trouble without any automation. > > darcs init > touch a b > darcs add a b > echo a > a > echo b > b > darcs record -am Wibble a; darcs record -am Wibble b > darcs check
That's not actually asynchronous; try darcs init touch a b darcs record -am Wibble a & darcs record -am Wibble b & wait darcs check It still won't happen at the same microsecond, in most cases. I can't think of a way to write an automated test script this race condition that doesn't involve editing files in _darcs/patches with an ed (or whatever) script. I suppose there might be a way to lie to darcs' get-time procedure, but offhand I don't know how. It probably wouldn't be reliable to just set the epoch time to 0 before you run each test, because of the microsecond granularity. PS: Oops, on rereading I see you were showing a potential human interaction, not a test case. I'm posting anyway because I think what I've written is useful. _______________________________________________ darcs-users mailing list darcs-users@darcs.net http://lists.osuosl.org/mailman/listinfo/darcs-users