I Love Shelving

| No Comments

No - this is not a post about the big news in Northern Ireland this past week.  On Friday night I was in the middle of a rather large change that I wasn't ready to check-in to the mainline of code.  However, as I am now in the habit of doing, I shelved the changes to TFS before I stopped work for the evening.  Shelving is a neat feature in Team Foundation Server.  It lets you save your files onto the server without committing the change into the mainline of code.

Over the weekend, my main development machine decided to die on me pretty badly.  It wouldn't even get as far as the BIOS screen - despite plenty of power getting to the motherboard.  An hour long conversation with the friendly technician resulting if nothing more than my knees getting a little dusty and so the machine is now in a box on the way back to the manufacturer.  However, I was able to un-shelve the changes from Friday night onto my laptop and carry on working were I left off with no code loss.

Needless to say - this morning I became a very big fan of shelving:-)

No Comments

You could of course think about 'why you need to shelve'. I only shelve during the day, if I have to move from one pc to another.

But if I read your story, I seem to get the impression you are making too big change sets ? Or not ?

My idea about a check-in is that it needs to be rather small and you keep your files checked out as short as possible ?

I totally agree with you. I normally try to keep changes very small and do frequent check-ins / get latest during the day to keep in sync.

In this particular case, I was avoiding checking in to the main line of code because we were in a product stabilization period prior to releasing a preview version to our customers. In effect, I was using shelving as I might have used a private branch - but just for a couple of days.

Also - I ended up using shelving to transfer a change in progress between my dying dev machine and my working laptop.

All in all, shelving (though it has its quirks) is a really useful feature of TFS.

Leave a comment

Archives

Creative Commons License
This blog is licensed under a Creative Commons License.