Reputation: 7365
I wrote a little tool to programmatically merge multiple branches. I use the following code:
var candidates = _server.GetMergeCandidates(sourcePath, targetPath, RecursionType.Full);
foreach (var c in candidates)
{
var changeset = new ChangesetVersionSpec(c.Changeset.ChangesetId);
var status = _workspace.Merge(sourcePath, targetPath, changeset, changeset);
if (!status.NoActionNeeded)
{
...
}
}
I get the correct merge candidates, but the status on each one is NoActionNeeded. When, I merge manually the changes show up as pending changes.
What am I doing wrong?
Upvotes: 1
Views: 1472
Reputation: 8544
In one of my own tools I do a very similar action with:
_workspace.Merge(sourcePath, targetPath, null, null, LockLevel.None, RecursionType.Full, MergeOptionsEx.None)
This operates on the 'latest' stand.
Upvotes: 4