Yep, VersionControlServer.TrackMerges () is the API you want to use. In the sourceItem parameter, pass the root of the branch with which you want to track changes. In the targetItems parameter, pass the root of the branches to which you want to track the set of changes. Note that this will only work for the roots of branches having merge relationships. The best way to make sure that this is true is to look at the hierarchy of branches and make branches directly connected or connected using some route.
Suppose you want to track a set of changes from $ / Proj / Main to $ / Proj / Feature2 in a branch hierarchy, for example:
$/Proj/Main
$/Proj/Dev
$/Proj/Feature2
Then you would like to pass $ / Proj / Main as sourceItem and $ / Proj / Dev AND $ / Proj / Feature2 as targetItems.
Let me know if you have any questions.
source
share