How do we best perform a Baseless Merge between two branches of a TFS Database Project?
We have a change in Branch B that we need to merge into branch A. Can we make a Schema Compare in VS and just update?
You do a baseless merge just like you would regardless of the type of files that are in your branch (it has nothing to do with the fact that you are using Database Projects, they are treated the same way as any other type of project - just a bunch of files in a branch).
In the Merge dialog it will list in the drop-downs the branches that have relationships, but you can always browse for another target branch to initiate a baseless merge.
Related
I have my "Main" branch from where I branched and created a new "Release" branch. In release we then checked in a few items, and then we were ready to merge back to the "Main" branch, but when I do this I get a changeset containing ALL FILES, why is that? What am I doing wrong? I am only interested in merging what has changed since the branch obviously.
When you merge in Merge wizard in Visual Studio, please choose Select
Changesets not choosing All changes up to a specific version. By default it is at All changes up to a specific version.
Then it list those changsets that haven't merged to the Main branch. You could select the latest changesets to merge.
We have two solutions which share same code base.
Although it is "bad practice" and they should be referencing to the same base, they are not.
I've added a new feature to the base of one solution, now I want to take the changeset and apply it to another solution.
They are both under the same team project (but diffrent solutions).
What I am doing now is using external program to compare between the two solutions and going applying the changes manualy one by one.
Maybe there is a better solution in VS2015?
You can use branches to accomplish the goal. How to branch folders and files
Since a codebase that is forked into various branches. After you added a new feature in one branch, you can directly merge the changeset to another branch. How to Merge folders and files
Finally, you can also compare folders and files to make sure all changes sync up.
We have very large project and we have to branch some of the sources. Branched sources should be stored in a different location (within the same TFS server).
The problem is that due to active development of the main project we have to merge changes from trunk every day.
So the question is: how should I branch sources to provide the easiest merging from trunk.
The desired scenario is:
pull changes from trunk. Resolve conflicts and merge changed sources.
push merged changes to branch (that is stored in different location - not as a branched version in the same location)
Is this possible without any complex scripts?
I am using Visual Studio 2013 for work with TFS source control.
You can have branch relationships been different locations in TFVC. You can branch from one team project to another and maintain the relationship.
If you currently have two locations that do not have a branch relationship you need to create one by doing a baseless merge first. One you have some a baseless merge you can then merge s normal As if they are in the same team project.
I would however recommend that you fix the problem that has lead to this situation. If you are going a single product then you should all be in the same team project.
http://nakedalm.com/one-team-project/
When we create a branch from our main trunk in TFS we also change the web.config to point to different databases, web services, etc. When we make a bug fix we do it in the release branch and merge back to the trunk. I'd like a way to click on the root node for the branch and merge the whole thing back to the trunk except for the web.config which has release-branch-specific settings which should not be merged back.
Is there a way to break the branch link for this file or is there some other method to permanently exclude the release web.config when merging back to the trunk?
You have two options to do this today:
Use "tf merge /discard". When performed on a file across branches it tells the merge engine that you do not want this specific change merged between these two branches. The downside of this approach is that you will need to run tf merge /discard each time you check in a change to the file. Here is what the syntax would look like if you wanted to discard the change from moving from releasebranch to trunk:
tf merge $/releasebranch/.../web.config $/trunk/.../web.config /discard
The second option is to cloak the web.config in the target branch when you are performing the merge. That is if you are merging into trunk, cloak the web.config file in the trunk branch in your workspace. When you perform the merge, since the target of the merge is cloaked, the change will not flow over the branch. The downside here of course is that you have to remember to perform the merges in workspaces with this configuration each time.
Bonus: I created this uservoice suggestion to improve this experience. Vote for it if this is something you would like to see improved.
s/w versions:
TFS2008 server, VS2010, windows xp
I have the following branch structure in TFS
$/Root/Main Branch
$/Root/Dev/Project1
Project1 was branched off the Main Branch, few months ago. Now I need to merge the latest code in the Main Branch to the Project1 branch. During that time, some new folders were added to the Main Branch.(Main Branch/CoreDataClasses/..). So when I try to merge this new folder into the Project1 branch using the merge wizard, I don't see the Project1 branch in the list of target branches. Why is TFS not showing me my dev branch in the target branches list?
Do your merge from the root (where you branched), not the individual folder(s). Remember that merges aren't destructive until you check in, so you can choose to only check in the new folders if you want to hold off other changes.
With Tfs I've had much better experience merging from branch to the trunk and I think this might be the case here. Of course this might take a rethink of your strategy but it's doable.
I know this may be way offside but if you're doing cross branch merging a lot then definitely consider a distributed version control system like mercurial. I've used Tfs lots and really like it but when it comes to branching and merging it is a distant second to hg merge (mercurial command)
The folder structure between source and target have to be the at least 80% the same. If there was too many restructuring of the folder layout then I suggest you use the cmd line Merge with the force switch when doing the merge. See "Merge Command".