本文整理汇总了C#中Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.QueryHistory方法的典型用法代码示例。如果您正苦于以下问题:C# VersionControlServer.QueryHistory方法的具体用法?C# VersionControlServer.QueryHistory怎么用?C# VersionControlServer.QueryHistory使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer
的用法示例。
在下文中一共展示了VersionControlServer.QueryHistory方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetIntervalChangeSetCount
private static int GetIntervalChangeSetCount(DateTime startInterval, DateTime endInterval, string username, VersionControlServer versionControlServer)
{
DateVersionSpec versionFrom = new DateVersionSpec(startInterval);
VersionSpec versionTo = new DateVersionSpec(endInterval);
var userHistory = versionControlServer.QueryHistory(
"$/",
VersionSpec.Latest,
0,
RecursionType.Full,
username,
versionFrom,
versionTo,
Int32.MaxValue,
false,
false);
var count = userHistory.OfType<Changeset>().Count();
return count;
}
示例2: GetIdsFromHistory
static List<int> GetIdsFromHistory(string path, VersionControlServer tfsClient)
{
if (tfsClient == null)
{
tfsClient = GetTfsClient();
}
IEnumerable submissions = tfsClient.QueryHistory(
path,
VersionSpec.Latest,
0,
RecursionType.None, // Assume that the path is to a file, not a directory
null,
null,
null,
Int32.MaxValue,
false,
false);
List<int> ids = new List<int>();
foreach(Changeset cs in submissions)
{
ids.Add(cs.ChangesetId);
}
return ids;
}
示例3: UpdatePath
public void UpdatePath(VersionControlServer vcs, string path)
{
if (String.IsNullOrEmpty(path)) return;
currentVcs = vcs;
store.Clear();
bool detailed = false;
IEnumerable changeSets = vcs.QueryHistory(path, VersionSpec.Latest, 0, RecursionType.Full, null,
null, null, stopAfter, detailed, false, false);
foreach (Changeset changeSet in changeSets)
{
store.AppendValues(changeSet.ChangesetId,
changeSet.Owner,
changeSet.CreationDate.ToString("d"),
changeSet.Comment);
}
// this would be nice be seems to cause a segfault
//ColumnsAutosize();
}
示例4: GetMergeHistory
private static IEnumerable GetMergeHistory(VersionControlServer vcs, MergeSource ms)
{
var changesetVersionSpec = new ChangesetVersionSpec(ms.VersionFrom);
var versionTo = new ChangesetVersionSpec(ms.VersionTo);
return vcs.QueryHistory(
ms.ServerItem,
changesetVersionSpec,
0,
RecursionType.Full,
null,
changesetVersionSpec,
versionTo,
2147483647,
true,
true);
}
开发者ID:ChrisEelmaa,项目名称:TFS-2015-Merge-Work-Items-Event-Handler,代码行数:17,代码来源:MergeWorkItemsEventHandler.cs
示例5: GetChangesetsFromServer
private static IEnumerable GetChangesetsFromServer(VersionControlServer versionControlServer, string workspaceMappingServerUrl)
{
return versionControlServer.QueryHistory(workspaceMappingServerUrl,
VersionSpec.Latest,
DELETION_ID,
RecursionType.Full,
null,
null,
VersionSpec.Latest,
1,
true,
false,
true);
}
示例6: FetchChangesets
private void FetchChangesets(VersionControlServer server, string path, VersionSpec version)
{
var changesets = server.QueryHistory(path, version, 0, RecursionType.None, null, null, version, int.MaxValue, true, false, true, false);
foreach (Changeset changeset in changesets)
{
if (changeset.Changes.Length != 1)
{
throw new InvalidOperationException("Expected exactly 1 change, but got " + changeset.Changes.Length + " for ChangesetId " + changeset.ChangesetId);
}
this.changesets.Add(changeset);
filenames.Add(null);
manualResetEvents.Add(null);
var change = changeset.Changes[0];
if (change.ChangeType.HasFlag(ChangeType.Branch))
{
var item = server.GetBranchHistory(new[] {new ItemSpec(change.Item.ServerItem, RecursionType.None)}, new ChangesetVersionSpec(changeset.ChangesetId))[0][0].GetRequestedItem().Relative.BranchFromItem;
if (item != null)
{
FetchChangesets(server, item.ServerItem, new ChangesetVersionSpec(item.ChangesetId));
}
}
}
}