Queue a build from branch B with shelveset from trunk A - visual-studio-2013

I'm trying to get a tfs build with a specific shelveset.
I need a build of branch A and the shelveset from Branch B.
When I right click the build definition of branch A and select 'Queue Build' I can choose 'latest source with shelveset' and selecting the shelve from branch B but I get an error "Exception Message: TF400921: No shelvesets could be unshelved for this build. The build will not proceed"
If I will queue a build from branch B with the shelveset if will work.
How can I ran a build from one branch with shelveset of another branch?

You cant unshelve code to a branch other than the one it came from. The TFS Power Tools provide a way to do this.
tfpt.exe unshelve
You will need to download and install the power tools and then unshelve the code to the branch that you want. If you then shelve from the correct branch your build process will work.

Related

TFVC: Annotate shows changes in development branches

I have a problem with annotate (Source control) in Visual Studio 2019 connected to TFS 2017. I get information from development branches when I annotate files in the MAIN branch.
Example: The file file.cs is in the MAIN branch. I branch it to a release branch and check in the file as changeset 1,2,3,4 and 5. I then merge the file to the MAIN branch in changeset 6.
When I annotate the file in the MAIN branch I see the changes done in changesets 1-5 from the development branch. I do not what that.... I only want to see the changes done on the MAIN branch, i.e. changeset 6.
Is there anyway to achieve that?

Visual Studio Merge Changes In Merge Tool Missing

I taken branched from master branch. While I work on branch, other developers worked on master branch. While merge operation branch to master branch, i saw multiple conflicts. I wanted manual merge but missing "Merge Changes In Merge Tool". There are just Keep Target Branch Version and Take Source Branch Version buttons. What can i do for issue?
PS : This issue, there are just .cs files.
If it's only for .cs files merging would probably been disabled.
In Visual Studio go to Team Explorer > Settings
Under section Team Project Collection > Source Control you can manage file extensions an the enabling of file merging.

How to convert a deleted regular directory into a branch in TFS?

I'm in the middle of migrating a repository from TFS to Git, and I'm using git-tfs.
I've already converted my Trunk branch using 'git tfs clone ...' successfully. When trying to 'git tfs branch --init' a related branch it fails with the error message: 'error: TFS branches $/foo/myrelatedbranch not found!'
This seem to be caused by the $/foo/myrelatedbranch no being a proper tfs branch. The 'branch' documentation (https://github.com/git-tfs/git-tfs/blob/master/doc/commands/branch.md) seem to be pretty clear on the related branch having to be a PROPER branch (https://github.com/git-tfs/git-tfs/blob/master/doc/commands/branch.md#merge-changesets-and-branches).
The branch $/foo/myrelatedbranch has been deleted a while back, so I'm not able to see the option 'Branching and Merging -> Convert to Branch' in the Source Control Explorer.
Is there any way of making this deleted directory a proper branch in TFS?
Using Visual Studio 2015 and TFS 2015
You can configure the Source Control Explorer to show deleted items:
From the menu bar choose Tools, Options.
On the Options dialog box, navigate to Source Control, Visual Studio Team Foundation Server.
Select Show deleted items in the Source Control Explorer, and then choose OK.
If you now open the Source Control Explorer, you can view the deleted folder and convert the folder to a branch.
You can also rollback the changeset that deleted the folder. The rollback will create a new changeset where the changes are negated (so in this case, where the folder is added).
If the problem still exists, you could just take a snapshot of the latest version and migrate that to Git.

Git with TFS and exclusive checkouts

I would like some advice on how to use Git locally on my computer along with Visual Studio and a TFS server. Unfortunately the technical leader of my company has set TFS with the exclusive check-out policy and so every time someone checks out a file, it can't be edited by someone else.
What is the right way to make the two systems live together? I would try to use Git-TF but I'm not convinced with the checkin phase. The workflow should be as the following:
clone the project
switch to offline mode for Visual Studio
work offline with Git
fetch from the TFS server and rebase
check-in?
The problem is: how do I check-in my files if someone else has already checked out the files I need to change? How does Git-TF really work when checking-in files?
Another workflow that came to my mind, without Git-TF, could be the following:
open the TFS project
switch to offline mode
create a new branch with Git
work on the branch
return to the master branch, update it
exclusively checkout the files which have been changed on my Git branch
merge the branch on master
check in with TFS (after switch to online mode?)
What do you recommend?

TFS 2010 Get Changeset Details from Branch to Branch

I would like to be able to supply a changeset from branch-2 and get the changesets that were merged up from branch-1. I have tried QueryHistory but have been unable to get any type of history. This functionality would be the same as the Tracking Changeset in VS 2010. This is needed by the release mgmt team to cross check approved changeset thru the lifecyle.
what you are after is the "tf merges" command;
you should use it as
tf merges branch-1 branch-2 /recursive

Resources