Life never ceases to amaze me. In this case, one day I write a rant about a Pigpen Developer who is anti-YAGNI, and then later in the week this exchange takes place.
Thursday morning, a customer tells me "Al, we're not going to need the XYZ functionality after all."
"No problem", I say, "I'll delete it."
"That would be great", they say, and I go off and delete all the code related to XYZ.
Friday morning, as I'm heading out to lunch, I meet the customer in the hallway and they say "Al, I made a mistake, we are going to need that XYZ functionality after all. Can you un-delete whatever you deleted?"
"No problem", I say, "I'll just recover it from our CVS repository when I get back from lunch."
"Thanks, Al. That would be great."
So, now that I've made my Pigpen rant, karma comes knocking to see if I have any idea what I'm talking about. Let's see ...
Recovering (un-deleting, if you prefer) files you've deleted from a CVS repository using Eclipse is a breeze, at least after you've done it once. Assuming that your project is in a CVS repository, here's all you have to do:
That's pretty darn simple. Kudos to the Eclipse developers for making this painless.
To give you a little idea of what the Eclipse Restore from Repository dialog looks like, I've included an image here (with a few portions intentionally smudged out):

Of course you can do the same things with other CVS tools, including the CVS command line client, and WinCVS. If you're interested in how to work with those just drop me a line and I'll write about them.
Post new comment