Author: ankit
Date: 2007-02-06 14:32:04 -0500 (Tue, 06 Feb 2007)
New Revision: 72374

Modified:
   trunk/monodevelop/Extras/MonoDeveloperExtensions/ChangeLog
   trunk/monodevelop/Extras/MonoDeveloperExtensions/Commands.cs
   
trunk/monodevelop/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
Log:
* Commands.cs: Remove all svn commands. We have svn integrated now.
* MonoDeveloperExtensions.addin.xml: Likewise.


Modified: trunk/monodevelop/Extras/MonoDeveloperExtensions/ChangeLog
===================================================================
--- trunk/monodevelop/Extras/MonoDeveloperExtensions/ChangeLog  2007-02-06 
19:18:31 UTC (rev 72373)
+++ trunk/monodevelop/Extras/MonoDeveloperExtensions/ChangeLog  2007-02-06 
19:32:04 UTC (rev 72374)
@@ -1,5 +1,10 @@
 2007-02-06  Ankit Jain  <[EMAIL PROTECTED]>
 
+       * Commands.cs: Remove all svn commands. We have svn integrated now.
+       * MonoDeveloperExtensions.addin.xml: Likewise.
+
+2007-02-06  Ankit Jain  <[EMAIL PROTECTED]>
+
        * MonoProject.cs (OnClean): Override.
 
 2006-02-02 David Makovský (Yakeen) <[EMAIL PROTECTED]>

Modified: trunk/monodevelop/Extras/MonoDeveloperExtensions/Commands.cs
===================================================================
--- trunk/monodevelop/Extras/MonoDeveloperExtensions/Commands.cs        
2007-02-06 19:18:31 UTC (rev 72373)
+++ trunk/monodevelop/Extras/MonoDeveloperExtensions/Commands.cs        
2007-02-06 19:32:04 UTC (rev 72374)
@@ -41,16 +41,9 @@
 {      
        public enum Commands
        {
-               Install,
-               SvnDiff,
-               SvnUpdate,
-               SvnStat,
-               SvnInfo,
-               SvnAdd,
-               SvnRevert,
-               SvnCommit
+               Install
        }
-       
+
        public class InstallHandler: CommandHandler
        {
                protected override void Run ()
@@ -72,135 +65,6 @@
                                p.Install (monitor);
                        }
                }
-       }
 
-       public class MonoProjectBuilder: NodeBuilderExtension
-       {
-               public override bool CanBuildNode (Type dataType)
-               {
-                       return typeof(MonoProject).IsAssignableFrom (dataType) 
||
-                                       typeof(ProjectFolder).IsAssignableFrom 
(dataType) ||
-                                       typeof(ProjectFile).IsAssignableFrom 
(dataType);
-               }
-               
-               public override Type CommandHandlerType {
-                       get { return typeof(MonoProjectCommandHandler); }
-               }
        }
-       
-       public class MonoProjectCommandHandler: NodeCommandHandler
-       {
-               [CommandHandler (Commands.SvnDiff)]
-               public void SvnDiff ()
-               {
-                       string path = GetPath ();
-                       if (path == null) return;
-                       
MonoDevelop.Core.Gui.Services.DispatchService.BackgroundDispatch (new 
StatefulMessageHandler (RunDiffAsync), path);
-               }
-               
-               public void RunDiffAsync (object pa)
-               {
-                       string path = (string) pa;
-                       using (IProgressMonitor monitor = 
IdeApp.Workbench.ProgressMonitors.GetOutputProgressMonitor ("Subversion 
Output", "", true, true)) {
-                               monitor.Log.WriteLine ("Running: svn diff " + 
path + " ...");
-                               StreamWriter w = new StreamWriter 
("/tmp/tmp.diff");
-                               ProcessWrapper p = 
Runtime.ProcessService.StartProcess ("svn", "diff " + path, null, w, 
monitor.Log, null);
-                               p.WaitForOutput ();
-                               w.Close ();
-                               
MonoDevelop.Core.Gui.Services.DispatchService.GuiDispatch (new MessageHandler 
(OpenDiff));
-                               monitor.Log.WriteLine ();
-                               monitor.Log.WriteLine ("Done.");
-                       }
-               }
-               
-               void OpenDiff ()
-               {
-                       IdeApp.Workbench.OpenDocument ("/tmp/tmp.diff");
-               }
-               
-               [CommandHandler (Commands.SvnUpdate)]
-               public void SvnUpdate ()
-               {
-                       SvnRun ("up {0}");
-               }
-               
-               [CommandHandler (Commands.SvnStat)]
-               public void SvnStat ()
-               {
-                       SvnRun ("stat {0}");
-               }
-               
-               [CommandHandler (Commands.SvnInfo)]
-               public void SvnInfo ()
-               {
-                       SvnRun ("info {0}");
-               }
-               
-               [CommandHandler (Commands.SvnAdd)]
-               public void SvnAdd ()
-               {
-                       SvnRun ("add {0}");
-               }
-               
-               [CommandHandler (Commands.SvnRevert)]
-               public void SvnRevert ()
-               {
-                       if 
(MonoDevelop.Core.Gui.Services.MessageService.AskQuestion ("Do you really want 
to revert " + GetPath() + "?"))
-                               SvnRun ("revert {0}");
-               }
-               
-               [CommandHandler (Commands.SvnCommit)]
-               public void SvnCommit ()
-               {
-                       IConsole console = 
ExternalConsoleFactory.Instance.CreateConsole (false);
-                       Runtime.ProcessService.StartConsoleProcess ("svnci", 
GetPath(), null, console, null);
-               }
-               
-               public string GetPath ()
-               {
-                       string path;
-                       if (CurrentNode.DataItem is ProjectFolder)
-                               path = 
((ProjectFolder)CurrentNode.DataItem).Path;
-                       else if (CurrentNode.DataItem is Project)
-                               path = 
((Project)CurrentNode.DataItem).BaseDirectory;
-                       else if (CurrentNode.DataItem is ProjectFile)
-                               path = ((ProjectFile)CurrentNode.DataItem).Name;
-                       else
-                               return null;
-                       return path;
-               }
-               
-               public void SvnRun (string cmd)
-               {
-                       string path = GetPath ();
-                       if (path == null) return;
-                       
MonoDevelop.Core.Gui.Services.DispatchService.BackgroundDispatch (new 
StatefulMessageHandler (RunAsync), new SvnCommand (cmd, path));
-               }
-               
-               public virtual void RunAsync (object pa)
-               {
-                       SvnCommand c = (SvnCommand) pa;
-                       string cmd = string.Format (c.Command, c.Path);
-                       using (IProgressMonitor monitor = 
IdeApp.Workbench.ProgressMonitors.GetOutputProgressMonitor ("Subversion 
Output", "", true, true)) {
-                               monitor.Log.WriteLine ("Running: svn " + cmd + 
" ...");
-                               ProcessWrapper p = 
Runtime.ProcessService.StartProcess ("svn", cmd, null, monitor.Log, 
monitor.Log, null);
-                               p.WaitForOutput ();
-                               monitor.Log.WriteLine ();
-                               monitor.Log.WriteLine ("Done.");
-                       }
-               }
-               
-       }
-       
-       class SvnCommand
-       {
-               public SvnCommand (string cmd, string path)
-               {
-                       Command = cmd;
-                       Path = path;
-               }
-               
-               public string Path;
-               public string Command;
-       }
 }

Modified: 
trunk/monodevelop/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
===================================================================
--- 
trunk/monodevelop/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
  2007-02-06 19:18:31 UTC (rev 72373)
+++ 
trunk/monodevelop/Extras/MonoDeveloperExtensions/MonoDeveloperExtensions.addin.xml
  2007-02-06 19:32:04 UTC (rev 72374)
@@ -30,106 +30,26 @@
                                         class = 
"MonoDevelop.Gui.Dialogs.OptionPanels.OutputOptionsPanel"/>
     </Conditional>
   </Extension>
-  
+
        <Extension path = "/SharpDevelop/Commands">
                <Command id = "MonoDeveloper.Commands.Install"
                                defaultHandler = "MonoDeveloper.InstallHandler"
                                icon = "gtk-network"
                                _label = "Install" />
-               <Command id = "MonoDeveloper.Commands.SvnUpdate"
-                                 _label = "Update" />
-               <Command id = "MonoDeveloper.Commands.SvnAdd"
-                                 _label = "Add" />
-               <Command id = "MonoDeveloper.Commands.SvnCommit"
-                                 _label = "Commit" />
-               <Command id = "MonoDeveloper.Commands.SvnDiff"
-                                 _label = "Diff" />
-               <Command id = "MonoDeveloper.Commands.SvnStat"
-                                 _label = "Stat" />
-               <Command id = "MonoDeveloper.Commands.SvnInfo"
-                                 _label = "Info" />
-               <Command id = "MonoDeveloper.Commands.SvnRevert"
-                                 _label = "Revert" />
        </Extension>
-                       
+
        <Extension path = "/SharpDevelop/Workbench/ToolBar/Build">
                <CommandItem id = "MonoDeveloper.Commands.Install" 
insertafter="MonoDevelop.Commands.ProjectCommands.Run"/>
        </Extension>
-       
+
        <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectBrowserNode">
                <Conditional activeproject="MonoMakefile" action="Exclude">
                        <CommandItem id = "MonoDeveloper.Commands.Install"
                                          insertafter = "BuildGroupSeparator"
                                          insertbefore = "Add" />
-                       <ItemSet id = "Svn" _label="Subversion">
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnUpdate"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnAdd"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnCommit"/>
-                               <SeparatorItem id = "s1" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnDiff"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnStat"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnInfo"/>
-                               <SeparatorItem id = "s2" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnRevert"/>
-                       </ItemSet>
                        <SeparatorItem id = "svnSep" />
                </Conditional>
        </Extension>
-       
-       <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/DefaultFileNode">
-               <Conditional activeproject="MonoMakefile" action="Exclude">
-                       <ItemSet id = "Svn" _label="Subversion">
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnUpdate"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnAdd"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnCommit"/>
-                               <SeparatorItem id = "s1" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnDiff"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnStat"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnInfo"/>
-                               <SeparatorItem id = "s2" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnRevert"/>
-                       </ItemSet>
-                       <SeparatorItem id = "svnSep" />
-               </Conditional>
-       </Extension>
-       
-       <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/ProjectFileNode">
-               <Conditional activeproject="MonoMakefile" action="Exclude">
-                       <ItemSet id = "Svn" _label="Subversion" insertafter = 
"OpenSeparator" insertbefore = "Add">
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnUpdate"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnAdd"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnCommit"/>
-                               <SeparatorItem id = "s1" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnDiff"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnStat"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnInfo"/>
-                               <SeparatorItem id = "s2" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnRevert"/>
-                       </ItemSet>
-                       <SeparatorItem id = "svnSep" />
-               </Conditional>
-       </Extension>
-       
-       <Extension path = 
"/SharpDevelop/Views/ProjectBrowser/ContextMenu/DefaultDirectoryNode">
-               <Conditional activeproject="MonoMakefile" action="Exclude">
-                       <ItemSet id = "Svn" _label="Subversion" insertbefore = 
"Add">
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnUpdate"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnAdd"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnCommit"/>
-                               <SeparatorItem id = "s1" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnDiff"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnStat"/>
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnInfo"/>
-                               <SeparatorItem id = "s2" />
-                               <CommandItem id = 
"MonoDeveloper.Commands.SvnRevert"/>
-                       </ItemSet>
-                       <SeparatorItem id = "svnSep" />
-               </Conditional>
-       </Extension>
-       
-       <Extension path = 
"/SharpDevelop/Workbench/Pads/MonoDevelop.Ide.Gui.Pads.ProjectPad">
-               <NodeBuilder id = "MonoProjectBuilder" class = 
"MonoDeveloper.MonoProjectBuilder"/>
-       </Extension>
 
        <Module>
            <Runtime>

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to