We use tfs2010 and vs2010.
Suppose I have two branches (make it simple):
Development
Main
I made some changes on development branch, checked in and merged to Main branch.
On development branch I have changeset with id 00001.
On main branch I have changesetid with 100001.
If I will history from Main branch, I can see a changeset 10001 with all the merged files (which is good).
However, is it possible to see that changeset 00001 is the ones that got merged from development to main branch?
I tried tfpt history followbranches, but tfpt doesn't have history command any more as it is moved to tf.
I then tried tf but tf history command doesn't have followbranches option at all.
Can someone help?
Many Thanks
In the history window of Main branch, Right Click on the Changeset (10001) and select "Track Changeset". After that select the Dev branch (in the Select Branches window) and then click the Visualize button at the bottom. You should see the window with the link between the Dev and Main changesets. You can view "Timeline Tracking" or "Hierarchy Tracking".
See below the link explaining it:
http://msdn.microsoft.com/en-us/library/dd405662.aspx
Scenario:
Checked in Dev branch
Want to Confirm weather Changeset is merged to QA Branch
Below is taken from Microsoft Docs.
To view the Tracking Changeset Window from the History window of a branch or file
In Source Control Explorer, click a branch or a folder or file that is contained by a branch.
Click the File menu, point to Source Control, and then click View History.
In the History window, right-click the changeset that you want to view, and click Track Changeset.
The Select Branches dialog box appears.
(Optional) In the Branches list, select or clear the check boxes for the branches that you want to show or hide.
As you select or clear check boxes, a preview of your selections appears on the right-hand side of the dialog box.
(Optional) If your team has a lot of branches, click the buttons above the preview to select the branches that you want more easily.
You can move the pointer over each button to get information about what the button does.
Click Visualize.
I have tried this in Visual Studio 2017.
Hope this helps.
Related
Using VS2013 and/or VisualStudio.com, is it possible after creating a branch ("Main" branched to "Dev001") to view a list of all the files that differ between "Main" and "Dev001"?
For example, I'd like to see all the files that have been amended/created within the current branch, since it was branched.
The closest I have got is right-clicking the branch, selecting View History, then clicking each changeset to view the files in the Changeset Details panel, however, there are many changesets in there which is taking a long time.
Please note I am not using Git.
Just right click on your Main branch in Source Control Explorer an select Compare.... From there you can specify the path to your branch and the versions you would like to compare.
I want to know how to view a list of all files that was committed by a user in their last commit. Not all files committed by them just the ones which were committed in the last batch. For example, suppose I just committed 10 files in TFS and now I want to view the list of just those 10 files.
How do I do that?
Thanks,
-R
In visual studio 2010 you can also go to file, source control, changesets and search for changesets from this windows. You have the option of applying filter on changesets by users, or by date or by change set ids. Get the results and you can double click to see the files that are part of the changesets displayed in a new window.
Or you install Team Foundation Sidekicks and go over the shelveset sidekick menu and get this screen
Ok got it.
Open any single file that you remember being part of the changeset in Visual Studio. Right click the file, go to source control and click on view history. Select the version you committed and right click then select view changeset details.
-R
So, we have our main dev line, I create a branch, and developer b creates a branch. We both do some work. developer b finishes his work, merges back into the main dev line. I know his changes will affect me, and rather than deal with the conflicts later, I would like to update my branch, with the changes that are now in the main dev line, so I can deal with them in my branch, prior to merging back into main.
How do I do that?
From Visual Studio, open Source Control Explorer:
View | Team Explorer
Select your Team Project from Team Explorer, expand it, and double click Source Control
In the left-hand pane of Source Control Explorer, select your Team Project.
In the right-hand pane, find your mainline branch, right-click and select Merge...
In the Target branch drop-down, select your dev branch.
If you want a subset of all the changes in the mainline:
Choose the Selected changesets radio button, click Next.
Select the changesets that represent the merge from your other dev's branch into main, click Next.
Otherwise, keep All changes up to a specific version selected, click Next
The next step has you pick a Version type. The default, Latest Version is obviously straightforward and self-explanatory: you would be brining all changes since your branch was created from the mainline down into your branch. The other choices are straightforward, but a tutorial explanation of each option available here would take a fair amount of space.
Walk through the remaining steps of the wizard.
Click Finish.
If there are any errors or merge conflicts, you will be prompted to resolve them, similar to what you would see if checking your changes into source control when other changes had been made since last checkout.
After the merge is done, all the changes are in your local copy of the branch, but they are not yet committed to source control. Once you've completed all your builds and testing on your branch, you can check in the merge. From Visual Studio:
View | Other WIndows | Pending Changes
Make sure all the files related to this merge are checked, add comments describing the merge, and click Check In.
I recommend keeping merges (and any necessary merge conflict resolution, build breaks, test breaks) as their own changeset. That is, do not mix other feature work with merges. Granular changesets make it much easier to review source control history, and to identify a single change of interest. Keeping merge work in its own changeset helps work toward that goal.
There is command-line for merging as well, run tf merge /? from a Visual Studio Command Prompt.
We have a setup with a development "trunk" in our recently-migrated-to-from-VSS TFS system and developers have been doing work in branches off the trunk, which are merged back in.
We've been diligently commenting our changesets at check in time, something we never did in the VSS days. However when I right-click on a trunk file in the Source Control Explorer and choose History, I only see monolithic changesets labeled "merge from dev branch" (or whatever the developer scribbled in there when they merged.) A history entry doesn't even seem to contain info on which branch was merged in at that time, let alone any info about the changesets that make it up, or the comments that go with them.
How have other TFS users dealt with this issue?
Is there another way to view the history that I'm missing here?
Looking at the history of a change prior to the merge has been a bit of a pain point with TFS. So much so that Microsoft have done a lot of work to address this in the next version of TFS (TFS 2010). In TFS 2010 (when it comes out), when you get to a merge in the history view it is actually a little twistie that you can expand and go see the history for the thing that was merged which is much nicer.
In the meantime, when I see I big monolithic merge (or branch) comment I tend to let out a audible sigh and then go find the file in the branch it was merged from in Source Control Explorer and do a view history there.
This might be what you are looking for: http://www.codeplex.com/TFSBranchHistory
Haven't used it personally, so I can't vouch for it.
Visit "TFS Branched History" plugin page at Microsoft Gallery:
http://visualstudiogallery.msdn.microsoft.com/7d4f37b6-f9a4-44c6-b0a0-994956538a44
Plugin does insert "Branched History" button into the context menu of Source Control Explorer (TFS)
The button icon is with clock like standard "History" but with blue arrow:
If you click "Branched History", new window will be opened and Path property will be set to the current Source Control Explorer path:
Click "Run query" to get results at the "History" tab:
From context menu you can query standard Changeset Details and Compare File (Folder) dialogs.
In TFS when you merge branch A to branch B and checkin, you get a single changeset on B (typically with a comment like "merged A->B").
This means B doesn't have any of the checkin history from A. So if someone created a new file on branch A, you can't tell who created it from branch B. And if someone updated a file on A, you can't tell who did the update from branch B.
Is there any way to see this kind of detailed changeset history across branches? Some kind of power toy, or third party tool, or anything?
Update: The TFS Power Toy tfpt history /followbranches tool does not "expand merges," it only "expands branches" and therefore doesn't solve this problem.
Right now 'tf merges' and 'tf merges /f:detailed' provide the most complete merge tracking information. However, they are command-line only. And the only 3rd party tool I know of that attempts to provide a GUI is TFS Sidekicks.
This gets a lot easier in TFS 2010. See screenshots at:
http://blogs.msdn.com/mitrik/archive/2009/06/08/first-class-branches.aspx
http://msdn.microsoft.com/en-us/library/dd405662(VS.100).aspx
http://msdn.microsoft.com/en-us/library/dd465202(VS.100).aspx
http://blogs.msdn.com/bharry/archive/2008/01/16/new-features-to-understand-branching-merging.aspx (old prototype, has changed somewhat since then)
TFS 2010 will include support for this.
Brian Harry talks about it in this presentation.
You will now be able to see where a change originated and who made it after the change has been merged to a different branch.
TFS SideKicks is another good tool for supplementing TFS default tools.
The TFS 2008 power toys does come with the tf history /followbranches command. But that command doesn't expand merges.
All it does is show you the change set history from A before branch B was created. What it doesn't show you is what change sets were merged from A -> B after the branch was created.
In other words, what I want to see is all the change sets that were made on a source branch and then applied to a target branch as part of merge operation.
I think you would find TFS Sidekicks helpful, especially the history area:
History Sidekick application pane provides the following features:
View version control tree with files and folders (similar to Source Control Explorer)
Search item (file or folder) by name and select found item in version control tree
View selected item history either for all users or filtered by user
Export history list to CSV file
Compare file versions selected in history
View selected item properties and pending changes
View selected item branches tree and selected branch properties
View selected item merge history; it is possible to view separately all merges performed with selected item as a merge target (merges to) or with selected item as a source (merges from)
Compare merge target and source file versions in history
View selected item merge candidates in a tree view; it is possible to select single merge source from the list
Compare merge candidate file version with latest version of target file
View selected item labels either for all users or filtered by user; the information displayed includes item version in label
Compare file versions between two labels
View changeset details supported in all lists containing changesets
Team Foundation Sidekicks
Might want to try the TFS Follow branch History tool:
http://www.codeplex.com/TFSBranchHistory
"TFS Branched History" plugin exists at Microsoft Gallery:
http://visualstudiogallery.msdn.microsoft.com/7d4f37b6-f9a4-44c6-b0a0-994956538a44
Plugin does insert "Branched History" button into the context menu of Source Control Explorer (TFS)
The button icon is with clock like standard "History" but with blue arrow:
If you click "Branched History", new window will be opened and Path property will be set to the current Source Control Explorer path:
Click "Run query" to get results at the "History" tab:
From context menu you can query standard Changeset Details and Compare File (Folder) dialogs.