Beispiel #1
0
        //////////////////////////////////////////////////////////////////////////////

        private void UpdateFolder()
        {
            if (ItemListView.SelectedRows.Count == 0)
            {
                return;
            }

            int     selectedIndex = ItemListView.Rows.IndexOf(ItemListView.SelectedRows[0]);
            SvnItem folder        = folders[selectedIndex];

            if (Config.ChangeLogBeforeUpdate && (folder.reviewedRevision < SvnTools.GetRepositoryHeadRevision(folder)))
            {
                MessageBox.Show("You need to see ChangeLog first!", "SVN Notifier", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }

            UpdateButton.Enabled = UpdateMenuItem.Enabled = CheckNowMenuItem.Enabled = false;
            folder.Status        = SvnStatus.Unknown;
            newNonUpdatedFolders.Clear();
            StatusLabel.Text = "Updating '" + folder.Path + "'...";
            UpdateTray(true);
            Refresh();                          // Show "Unknown" folder status during updating

            updateNotInProgress.Reset();
            BeginUpdateFolderStatuses();

            SvnTools.Update(folder, false);

            forcedFolders.Enqueue(folder);

            updateNotInProgress.Set();
        }
Beispiel #2
0
        private void UpdateAll()
        {
            newNonUpdatedFolders.Clear();
            StatusLabel.Text = "Updating all...";
            UpdateTray(true);

            BeginUpdateFolderStatuses();

            UpdateButton.Enabled = UpdateMenuItem.Enabled = CheckNowMenuItem.Enabled = TrayUpdateAllMenuItem.Enabled = false;

            foreach (SvnItem folder in folders)
            {
                if ((folder.Status == SvnStatus.NeedUpdate) || (folder.Status == SvnStatus.NeedUpdate_Modified))
                {
                    folder.Status = SvnStatus.Unknown;
                    if (Config.UpdateAllSilently)
                    {
                        SvnTools.BeginUpdateSilently(folder);
                    }
                    else
                    {
                        updateNotInProgress.Reset();
                        SvnTools.Update(folder, true);
                        forcedFolders.Enqueue(folder);
                        updateNotInProgress.Set();
                    }
                }
            }
            UpdateTray(true);
        }