Perhaps it's just because I'm not familiar with TFS (I've worked mostly with SVN), but I don't understand how to create a branch on a Codeplex hosted project.
I'm using VS2012. In the Source Control Explorer, I select Branching and Merging > Branch... in the context menu, but then I don't know what to enter in the Target field:
If I try $/wpfanimatedgif/branches/1.3
, I get the following error:
The target item $/wpfanimatedgif/branches/1.3 cannot be under the source item $/wpfanimatedgif.
If I try $/branches/1.3
, I get this error:
TFS10198: Source control must branch into an existing team project. branches is not a team project.
I also tried to create a new team project from Team Explorer, but I don't have the required permissions.
So how can I create a branch? Or is it impossible to do it on a Codeplex project?
BTW, the reason I want to create a branch is because I'm working on an experimental feature and I don't want to publish to the "trunk" (or whatever it's called in TFS). Perhaps TFS has a different way of handling this scenario? I know about shelving changes, but if I understand correctly, the shelved code won't be available on Codeplex, will it?
Right-click on the FAST Search folder and select Branching and Merging -> Branch from the context menu. Once you clicked on Branch it will open a prompt window and set the Target location and leave the defaults.
The development isolation TFS branching strategy involves one or more development branches. These are kept separate from the main. Each development branch is a complete copy of the main branch. Development branches are built and tested, then code is promoted to the main branch.
In Source Control Explorer, right-click the folder or file that you want to branch and select Branching and Merging > Branch. In the Branch dialog box, under Target box, modify the location and name for the new branch, or select Browse to browse to and select a target.
First, it may help to understand what a "Team Project" is - it's a logical entry in source control at the top-level of the source control tree, and is intended, typically, for a group of developers and various permissions and settings are set at this level. Within a Team Project, you can have multiple development projects such as Visual Studio solutions or Java projects. In this case, your team project is $/WpfAnimatedGif
.
As for branching and merging, those occur below the Team Project level, typically as peers to your trunk
or main
branches. Various branching and merging strategies are covered in the TFS Branching and Merging Guide, but a simplified example for a Visual Studio solution called "WpfAnimatedGif" might have a branch strategy that looks like:
$/WpfAnimatedGif/main/WpfAnimatedGif
$/WpfAnimatedGif/branches/1.3/WpfAnimatedGif
$/WpfAnimatedGif/branches/test_features/WpfAnimatedGif
As for "best practices", they would be to create a trunk
or main
folder underneath the $/WpfAnimatedGif
folder and move your VS projects beneath that. However, you could create a new folder for each branch and branch each project independently.
Eg:
$/WpfAnimatedGif/WpfAnimatedGif
branched to $/WpfAnimatedGif/branches/1.3/WpfAnimatedGif
and
$/WpfAnimatedGif/WpfAnimatedGif
branched to $/WpfAnimatedGif/branches/1.3/WpfAnimatedGif.Demo
However since these branches are independent, you would also have to then merge these two folders independently, instead of atomically from the branches
folder.
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