I've always used SVN in my past, and now that we have moved past the initial phase of a project we need to figure out our branching process for future enhancements.
In reading up on this, we see that TFS has Shelving.
How do they compare? What are the big gotcha's on each?
In general, which is preferred and why?
Branching in TFVC uses path-based branches that create a folder structure. When you create a branch, you define a source, usually the main folder, and a target. Then files from the main folder are copied into your branch.
The shelve command of the tf command-line utility backs up pending changes, a list of associated work items, in-progress check-in notes, and comments in a shelveset on the Team Foundation Server. A *shelveset *is much like a changeset that is not committed to the server.
Unshelving is how you restore the shelveset to your machine so you can keep working on it. It doesn't change the shelveset on the server (to do that you need to shelve things again and use the same shelveset name).
To shelve your current pending changes, right click the project, Shelve, add a shelve name. This will save (or Shelve) the changes to the server (no-one will see them) You then do Undo Pending Changes to revert your code back to the last check-in point.
Shelvesets are per-user and differently stored in the source control - it is not possible to merge shelvesets, there's no history etc. The only action possible is unshelving; you cannot even merge files while doing so. So, we only use it as a temporary storage for things that are not finished yet and thus cannot be checked into a branch.
So, you should use branches ;-) maybe a Main branch and different development branches for features & bugfixing.
Shelving and branching are not the same concept.
Branching is taking a code base and "splitting" it off, basically making a copy of it. Development teams can all work on their own branches (for example) and then all changes can then be merged back into an originating branch. Branches can only be merged into a parent branch in TFS.
Shelving allows developers to check code into the source control system into a "shelve". The code is not checked into the main branch. If a build manager or another developer "gets latest", he will not get shelved code by default. The shelve is safely stored in source control like all other code, it is just not in the branch. Other developers can pull shelves down to see the effects. At some point, the changes will be checked into the main branch and will be part of a changeset.
I suggest this book: http://www.amazon.com/Team-Foundation-Server-2008-Action/dp/1933988592/ref=sr_1_1?ie=UTF8&s=books&qid=1263417920&sr=8-1
It has a very simple, yet effective explanation of shelving, merging and various branching models.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With