On unit testing and "rm -rf src/java"
I've just gone through the task of recovering the source files I've been working on for JRDF after an inadvertent rm -rf src/java
. As you would expect this is not a pleasant experience... Two things however, made my life easier.
Firstly, using IntelliJ I was able reverse the change as easily as going back in my local history. So this kept me going for a few days, until I needed to commit my changes back to CVS. Here's where the trouble started. CVS gave me the always helpful "XXX is in the way, move it aside" warning and promptly gave me big fat Cs down the screen. Figuring the easiest way to deal with it was to in fact move the files aside, I did so and began a manual merge. Into the ring comes IntelliJ again with its very clean manual comparison tool.
Secondly, the high quality of the unit tests Andrew and I been writing lately (more on that later) ensured that once I'd completed the merge, I could be sure that I'd not lost any functionality. Lucky for me, I've lately taken to storing my test source in a separate source tree (test/java) from my production source (src/java), so my fat fingered delete left the tests intact.
0 Comments:
Post a Comment
<< Home