Ce code obtenir tous les changesets entre deux étiquettes:
Console.WriteLine("Enter the first build label:");
var firstVersion = Console.ReadLine();
Console.WriteLine("Enter second build label:");
var secondVersion = Console.ReadLine();
var server = TfsTeamProjectCollectionFactory.GetTeamProjectCollection(new Uri("TFS SERVER INSTANCE"));
var hyperlinker = server.GetService<TswaClientHyperlinkService>();
var versionService = server.GetService<VersionControlServer>();
var changesets = versionService.QueryHistory(@"$/EntDev", VersionSpec.Latest, 0, RecursionType.Full, null,
VersionSpec.ParseSingleSpec("L" + firstVersion, null),
VersionSpec.ParseSingleSpec("L" + secondVersion, null),
Int32.MaxValue,
false,
false);
var workItems = new List<WorkItem>();
foreach (Changeset changeset in changesets)
{
var link = hyperlinker.GetChangesetDetailsUrl(changeset.ChangesetId);
Console.WriteLine("#" + changeset.ChangesetId.ToString() + " - " + changeset.Comment + " - " + link.ToString());
workItems.AddRange(changeset.WorkItems);
}
foreach (var item in workItems)
{
var link = hyperlinker.GetWorkItemEditorUrl(item.Id);
Console.WriteLine("WI#" + item.Id + " - " + item.Title + " - " + link.ToString());
}
Console.ReadLine();
Il ressemble à une réponse a été donnée à cette question précise: http://stackoverflow.com/questions/3821734/show-all-changesets -entre-deux-étiquettes. –
Utilisez-vous TFS? – JBone