I'm currently using TFS 2013 Update 3 with TFVC, along with Visual Studio 2013 Update 3.
Let's say there is a branch A, with a series of changesets, e.g. 11346
, 12345
, 12897
. Then a branch B is created from branch A and changeset 12345
(Branch from Version
, By Changeset
).
At this point, from Visual Studio, it's easy to check that branch B is a child of branch A (e.g. right click on branch B -> Advanced
-> Properties
-> Relationships
) but, is there also a way to know that branch B was branched from the particular changeset 12345
?
At the moment, when branching by changeset, I explicitly write the changeset number of the parent branch in the description of the new child branch; however, I was wondering if that information is available "automatically" somewhere, just like the relationship of the two branches as mentioned before.
It'd be OK even if such information could only be retrieved through the command line.
The TFS functionality to use is the Track Changeset.
See View where and when changesets have been merged in the MSDN documentation.
By opening the Tracking Changeset window, you can determine which branches have and have not received a set of changes.
It's then possible to find the original parent changeset number of a branch that was created with a branching-by-changeset operation.
Basically, these are the actions that can be done from Visual Studio following the scenario showed in my question (branch A: parent branch, branch B: child branch):
Source Control Explorer
window, right click on the child branch -> View History
Track Changeset
Path filter
through the Browse...
buttonVisualize
button, the Tracking Changeset
window appearsHierarchy Tracking
view is displayed: the parent branch shows the list of changesets, where the last one is the one of interest. Alternatively, the Timeline Tracking
can be used. These two views show clearly the relationship of the two branches, when the child branch was created and the parent changeset number that the child branch originated from.