3
3
using System.Collections;
4
using System.Collections.Specialized;
5
4
using MonoDevelop.VersionControl.Dialogs;
6
using MonoDevelop.Ide.Gui;
7
5
using MonoDevelop.Core;
8
using MonoDevelop.Core.Gui;
10
8
namespace MonoDevelop.VersionControl
47
45
if (!VersionControlService.NotifyPrepareCommit (vc, changeSet))
49
47
CommitDialog dlg = new CommitDialog (changeSet);
50
dlg.TransientFor = IdeApp.Workbench.RootWindow;
52
if (dlg.Run () == (int) Gtk.ResponseType.Ok) {
49
if (MessageService.RunCustomDialog (dlg) == (int) Gtk.ResponseType.Ok) {
53
50
if (VersionControlService.NotifyBeforeCommit (vc, changeSet)) {
54
51
new CommitWorker (vc, changeSet, dlg).Start();
93
91
protected override void Run ()
97
vc.Commit (changeSet, GetProgressMonitor ());
95
vc.Commit (changeSet, Monitor);
96
Monitor.ReportSuccess (GettextCatalog.GetString ("Commit operation completed."));
102
Gtk.Application.Invoke (delegate {
103
dlg.EndCommit (success);
105
VersionControlService.NotifyAfterCommit (vc, changeSet, success);
106
ArrayList dirs = new ArrayList ();
107
ArrayList files = new ArrayList ();
108
foreach (ChangeSetItem it in changeSet.Items)
109
if (it.IsDirectory) dirs.Add (it.LocalPath);
110
else files.Add (it.LocalPath);
111
foreach (FilePath path in dirs)
112
VersionControlService.NotifyFileStatusChanged (vc, path, true);
113
foreach (FilePath path in files)
114
VersionControlService.NotifyFileStatusChanged (vc, path, false);
103
protected override void Finished ()
105
dlg.EndCommit (success);
107
VersionControlService.NotifyAfterCommit (vc, changeSet, success);
108
ArrayList dirs = new ArrayList ();
109
ArrayList files = new ArrayList ();
110
foreach (ChangeSetItem it in changeSet.Items)
111
if (it.IsDirectory) dirs.Add (it.LocalPath);
112
else files.Add (it.LocalPath);
113
foreach (FilePath path in dirs)
114
VersionControlService.NotifyFileStatusChanged (vc, path, true);
115
foreach (FilePath path in files)
116
VersionControlService.NotifyFileStatusChanged (vc, path, false);