On our TFS Server, we have a Team Project called "Connect". The root folder for that Team Project contains the root of the web application project. I'm not sure if it was setup correctly, but what I'm trying to do is create a branch of the "Connect" Team project so there are 2 versions, 1 for Production, 1 for a new development/enhancement. What are the correct steps to get the right structure? So that we can work on the enhancement in one, and eventually merge it into the production branch....
You'll have to do some restructuring here. At a minimum that is probably:
$/Connect
---------dev
---------main
Where dev and main will become your branches and contain all the code that is currently in the root.
I'd usually expect to see something more like
$/Connect
---------ConnectWeb
-------------------dev
-----------------------src
--------------------------Connect
-------------------main
-----------------------src
--------------------------Connect
where dev and main are the branches and Connect contains the files and folders currently in root. By putting the branches in another folder (I called it ConnectWeb) you have the option of having multiple development projects within the same Team Project which allows you to manage a portfolio backlog in a single team project.
Rename or move files and folders
Related
I am doing to for the first time so I want to use Release isolation strategy for our project using TFVC. I went over documentation on how to do that but I was unable to branch out our projects. We have two projects which are dependent on each other and structure of those projects looks like this:
Project 1
folder 1
folder 2
folder 3
I tried to convert project itself to branch and then branching it out but it gives me an error saying TF10175: ... Team project does not exist. Then I tried to create one main folder inside the project and convert that folder into branch and then branch it out but reorganizing folders causing build issues. Do you have any advice how I could branch my projects out and why am I getting team project does not exist issue. Do I need to create new project in TFS called XYZ-branch?
Currently we have a team project in TFS 2010 named MyApp that was put in years ago. I would like to create MAIN and DEV branches as described in the ALM Rangers guide. I know it would've been easier if the existing team project was created with the branches initially, but that's in the past. I don't want to lose the version history in the existing project.
Is it possible to create those branches (or at least a DEV branch) without affecting the existing project?
UPDATE My folder structure looks something like this (bold is folder, italic is file):
server\DefaultCollection
MyApp
Lib
packages
Repositories
MVCClient
MyApp.sln
There's not a great solution to this, but here's one option:
Create a MAIN folder. Copy all your source under this folder. Convert MAIN to a branch. Branch DEV from MAIN.
Keep your old source code around (the stuff not under the MAIN folder) for history purposes.
I've got a situation that I'm not sure if I can work around.
I've recently started on a new team that had never used any type of Version Control system, and our organization uses TFS as a standard (which I'd never used before).
After a lot of pleadind, I got the admins to creat a TFS project for my existing code on our server, and since none of my project's code had ever been checked in (after many years of existence), I wanted it in version control asap, so I checked my project into the root folder of the project. Not having read the Branching Strategy at http://tfsbranchingguideiii.codeplex.com/ I hadn't setup "Main" and "Release" folders in my main project.
At the time, I had separate folders on my local workstation containing the different releases we had made. I checked each version in, labeled it with the release number, and then checked the next version in on top of that.
I'm now running into an issue/bug with one of my previous releases and I'm trying to branch off a label in order to make some changes in one of my releases. TFS throws an error that I can't create a branch in that location (because all of the source in under the main project folder).
I've tried creating a "Main" and "Releases" folder, and then moving all the source under the Main folder, but the trouble is that the history and labels are pinned to the original location which is the root folder. If I try to branch off a label, the label doesn't exist in the "Main" folder that I moved the code to, but rather where it was created (in the root).
As such, TFS is still trying to branch from the root folder when I attempt a branch from the label.
My question is this: As an administrator for the server, is there a way to move everything (source, history, and labels) from their original location?
Thanks!
I don't think you can "move" the history and the labels. As you say, they're bound to the original source location. A move is effectively a rename.
In my experience, even renames of folders to folders that were deleted have caused those new folders to acquire the deleted folder's history.
Have you considered branching your current team project into another team project while observing the folder structure that you want in the new team project.
Create a new team project with the folder structure you want. E.g.:
/NewTeamProject
/Main (branch into here)
/Src (or whatever your root source folder is)
/Doc
/Releases
You can then keep the old team project around for "insurance".
It shows how helpful it is to have a reasonably thought-out folder structure.
I have the following structure:
$/ProjectA [Uses MS Agile Template]
--Branch1
$/ProjectB [Uses Custom Agile Template]
--[To Be Created Branch]
How can I create this new branch in ProjectB that has a parent relation with $/ProjectA/Branch1?
Our requirement says that we cannot be under the same Project because we must use different templates, but we still want to merge the code from new project back to the ProjectA. I checked the option in TFS when you create a new Project that lets you use an existing source control, but problem with that is:
1.There is NO option to bring in specific branches in a Project [Its all or none]
2.I cannot rename that new branch in the new project for some reason
I understand this can be achieved by using a Baseless merge between these 2 projects but I would like to know if there is still a way to have a smooth merge between these 2 branches in different projects.
P.S: we are using VS 2010 with TFS 2010
There's shouldn't be any problems in just branching from one team project into another. You should be able to do this just like you would any branch: just select $/ProjectA/Branch1, select Branch, and enter a branch target path of $/ProjectB/ToBeCreatedBranch.
This is because realistically, Team Projects are of fairly limited scope in TFS version control - it primarily treats the source control tree as a big hierarchy beginning at $/, and team projects are not particularly special, except for some very specialized operations. (Check-in policies are queried for by Team Project, as are settings for locklevels and labels are scoped to Team Projects.)
I'm a little unclear what version control options you specified when you created the new Team Project - you should have just created a new source tree node for it and then you can create your project branches beneath $/ProjectB.
Underneath one "Project" in TFS we have multiple products. This is because for us, a project is a business unit and they each can have many applications that we develop for them. Each one has its own folder in source control(under the TFS project) and each one has its own TeamBuild set up. The issue I have is that whenever a build runs, the report generated for it contains a listing of all the changesets that were associated to the TFS Project; even though many of them were for a different product and the code referenced actually wasn't compiled or built during that build.
Does anyone know how to get TFS to only include changesets in its report that are associated to the actual VisualStudio projects that are being built in TeamBuild?
The best solution would to to modify the Workspace Mapping for the Team Build Definition to include the Solution Root path instead of the Team Project Root.
In TFS2008,
Right click the Team Build Definition and choose 'Edit Build Definition'
Select the 'Workspace' tab
Remove the existing mapping: $/TeamProjectName
Add a new mapping to the solution root, for example: $/TeamProject/Main/Solution1/
In TFS2005,
Open Source Control Explorer
Browse to $/TeamProject/TeamBuildTypes/BuildName/WorkspaceMappings.xml
Get Latest of the file and check it out for edit
Remove the existing mapping: $/TeamProjectName
Add a new mapping to the solution root, for example: $/TeamProject/Main/Solution1/
This workspace mapping defines the scope for changesets to be included in the build.
See:
http://blogs.msdn.com/buckh/archive/2007/08/14/tfs-2008-a-basic-guide-to-team-build-2008.aspx
http://msdn.microsoft.com/en-us/library/ms181718.aspx
http://msdn.microsoft.com/en-us/library/ms181286.aspx
Grant