I have a folder under TFS source control system, let's say under "$/My Project/Branches/Dev" path.
It was just recently moved from another location, which was "$/My Project/Dev".
Now when I request its history from the Source Control Explorer in VS I get the full history, where the described move operation was just one of the changesets.
But when I try to get the history using TFS SDK I only get the recent history started with the move of the folder. How can I get the full history?
I'm using the following code:
TeamFoundationServer tfs = TeamFoundationServerFactory.GetServer(tfsServerURL);
VersionControlServer vcs = (VersionControlServer)tfs.GetService(typeof(VersionControlServer));
// Null means All
VersionSpec versionFrom = null;
System.Collections.IEnumerable enumerable = vcs.QueryHistory(_tfsPath,
VersionSpec.Latest,
0,
RecursionType.Full,
"",
versionFrom,
VersionSpec.Latest,
Int32.MaxValue,
true,
true);
You are passing slotMode = true. Change the final parameter to false.
"Slot mode" means "query by path, not by history." It's useful if you only remember the old name of an item but not where you moved it to, or if >1 item has occupied a given path.
For future reference, if you want to see what parameters VS (or tf.exe) is passing to the server so you can mimic them, turn on tracing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With