Beispiel #1
0
        public void ShowChangeset(VersionControlServer vcs, int cid)
        {
            ChangesetVersionSpec versionSpec = new ChangesetVersionSpec(cid);

            string tname = System.IO.Path.GetTempFileName();

            using (StreamWriter sw = new StreamWriter(tname))
            {
                DiffHelper.ShowChangeset(vcs, versionSpec, false, GetDiffOptions(sw));
            }

            using (StreamReader sr = new StreamReader(tname))
            {
                textView.Update("temp.diff", sr.ReadToEnd());
            }

            File.Delete(tname);
        }
Beispiel #2
0
        public FileView(VersionControlServer vcs, string path)
        {
            view = MyTextViewFactory.CreateNewTextView();
                Add(view);

                if (String.IsNullOrEmpty(path)) return;
                Microsoft.TeamFoundation.VersionControl.Client.Item item = vcs.GetItem(path, VersionSpec.Latest, 0, true);

                string tname = System.IO.Path.GetTempFileName();
                item.DownloadFile(tname);

                using (StreamReader sr = new StreamReader(tname))
                    {
                        view.Update(path, sr.ReadToEnd());
                    }

                File.Delete(tname);
        }
Beispiel #3
0
        public FileView(VersionControlServer vcs, string path)
        {
            view = MyTextViewFactory.CreateNewTextView();
            Add(view);

            if (String.IsNullOrEmpty(path))
            {
                return;
            }
            Microsoft.TeamFoundation.VersionControl.Client.Item item = vcs.GetItem(path, VersionSpec.Latest, 0, true);

            string tname = System.IO.Path.GetTempFileName();

            item.DownloadFile(tname);

            using (StreamReader sr = new StreamReader(tname))
            {
                view.Update(path, sr.ReadToEnd());
            }

            File.Delete(tname);
        }