当前位置: 首页>>代码示例>>C#>>正文


C# VersionControlServer.QueryHistory方法代码示例

本文整理汇总了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;
        }
开发者ID:rpwjanzen,项目名称:blinken,代码行数:20,代码来源:TfsCommits.cs

示例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;
        }
开发者ID:mrcaron,项目名称:Tfs2010QueryHistoryPerfExp,代码行数:26,代码来源:Program.cs

示例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();
        }
开发者ID:Jeff-Lewis,项目名称:opentf,代码行数:21,代码来源:ChangesetView.cs

示例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);
 }
开发者ID:jimbobTX,项目名称:SirenOfShame,代码行数:14,代码来源:MyTfsBuildDefinition.cs

示例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));
                    }
                }
            }
        }
开发者ID:NikolayKash,项目名称:sonar-scm-tfvc,代码行数:25,代码来源:HistoryProvider.cs


注:本文中的Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.QueryHistory方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。