[darcs-users] bug: unrevert fails after rerecord

Tommy Pettersson ptp at lysator.liu.se
Sat Aug 28 02:30:33 UTC 2004


On Fri, Aug 27, 2004 at 07:36:21AM -0400, David Roundy wrote:
> haven't had time to test it.  If you could try it out and verify that it
> works, that would be great.  Even better would be if you would add a script
> to the tests directory checking that unrevert actually works in situations
> like this.

I think it works.  I also wrote a test script.

By the way ('cause this boggled me in the test script),
unrevert Fails if there is no unreverting to do, whereas, for
example, record just smiles and says "No changes" if there is
no recording to do.  I guess there are reasons both for and
against returning no success in all nothing-to-do cases.
Any thoughts on this?  I tried to hack in a test with
doesFileExist and exitWith ExitSuccess in place of the call
to fail, but it felt ugly.  I have yet not enough skills in
Haskell's IO, I think.

Another thing about the test scripts: the $HOME/.darcs/defaults
file.  One of the tests jumped on me, and after many
adventures I found it to be I had --no-setdefault in
this file.  It was kind of funny, because I used trackdown
(first time, just got to say WOW, trackdown is awesome!),
and located the introduction of the test failure to the fix
for the set-default bug.  Well, the conclusion was that when
the set-default didn't work, my --no-setdefault didn't break
the test.  Anyway, I spent half the day to find this out (at my
own will and amusement of course).  So, perhaps the test suite
should somehow make sure it has a predictable configuration.
On the other hand, it is a Good Thing to run the tests with
all possible configurations.  But darcs is getting a lot of
configuration switches, and it might get hard to write every
test script in a configuration-independent manner.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list