Example #1
0
        private void InitializeSoft()
        {
            GitStash gitStash = Stashes.SelectedItem as GitStash;

            Stashed.GitItemStatuses = null;

            Loading.Visible          = true;
            Stashes.Enabled          = false;
            toolStripButton1.Enabled = false;
            if (gitStash == null)
            {
                Stashed.GitItemStatuses = null;
            }
            else
            if (gitStash == currentWorkingDirStashItem)
            {
                ThreadPool.QueueUserWorkItem(
                    o =>
                {
                    IList <GitItemStatus> gitItemStatuses = GitCommandHelpers.GetAllChangedFiles();
                    _syncContext.Post(state1 => LoadGitItemStatuses(gitItemStatuses), null);
                });
            }
            else
            {
                ThreadPool.QueueUserWorkItem(
                    o =>
                {
                    IList <GitItemStatus> gitItemStatuses = GitCommandHelpers.GetDiffFiles(gitStash.Name, gitStash.Name + "^");
                    _syncContext.Post(state1 => LoadGitItemStatuses(gitItemStatuses), null);
                });
            }
        }
Example #2
0
        private void RevisionGridSelectionChanged(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current            = Cursors.WaitCursor;
                DiffFiles.GitItemStatuses = null;
                var revisions = RevisionGrid.GetRevisions();

                if (revisions.Count == 1)
                {
                    DiffFiles.GitItemStatuses =
                        GitCommandHelpers.GetDiffFiles(
                            revisions[0].Guid,
                            revisions[0].ParentGuids[0]);
                }

                if (revisions.Count == 2)
                {
                    DiffFiles.GitItemStatuses =
                        GitCommandHelpers.GetDiffFiles(
                            revisions[0].Guid,
                            revisions[1].Guid);
                }
            }
            catch (Exception ex)
            {
                Trace.WriteLine(ex.Message);
            }
            Cursor.Current = Cursors.Default;
        }
Example #3
0
        public void SetRevision(GitRevision revision)
        {
            Revision = revision;
            DiffFiles.GitItemStatuses = null;
            DiffFiles.GitItemStatuses = GitCommandHelpers.GetDiffFiles(revision.Guid + "^", revision.Guid);

            commitInfo.SetRevision(revision.Guid);
        }
Example #4
0
        public void SetRevision(GitRevision revision)
        {
            Revision = revision;
            DiffFiles.GitItemStatuses = null;

            if (revision.ParentGuids.Length > 0)
            {
                DiffFiles.GitItemStatuses = GitCommandHelpers.GetDiffFiles(revision.Guid, revision.ParentGuids[0]);
            }

            commitInfo.SetRevision(revision.Guid);
        }