public override List<TFSClient.Changeset> GetChangesets()
        {
            List<int> changesetIds = new List<int>();
            List<TFSClient.Changeset> changesets = new List<TFSClient.Changeset>();

            TFSClient.LabelVersionSpec vLabel = new TFSClient.LabelVersionSpec(Context.Label);

            TFSClient.VersionControlLabel[] versionControlLabels = VersionControl.QueryLabels(Context.Label, Context.SourceControlPath, string.Empty, true, string.Empty, vLabel);

            foreach (TFSClient.VersionControlLabel label in versionControlLabels)
            {
                foreach (TFSClient.Item item in label.Items)
                {
                    if (!changesetIds.Contains(item.ChangesetId))
                        changesetIds.Add(item.ChangesetId);
                }
            }

            foreach (int counter in changesetIds)
            {
                changesets.Add(VersionControl.GetChangeset(counter));
            }

            return changesets;
        }
Ejemplo n.º 2
0
        public void LabelVersionSpec()
        {
            VersionSpec spec = new LabelVersionSpec("label");

            Assert.AreEqual("Llabel", spec.DisplayString);
        }