Author: lluis
Date: 2008-01-21 11:47:35 -0500 (Mon, 21 Jan 2008)
New Revision: 93413

Modified:
   trunk/monodevelop/main/src/addins/VersionControl/ChangeLog
   
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs
   
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/ChangeLog
   
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs
Log:
* 
MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs,
  MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs:
  Notify file changes through the FileService.

Modified: trunk/monodevelop/main/src/addins/VersionControl/ChangeLog
===================================================================
--- trunk/monodevelop/main/src/addins/VersionControl/ChangeLog  2008-01-21 
16:44:57 UTC (rev 93412)
+++ trunk/monodevelop/main/src/addins/VersionControl/ChangeLog  2008-01-21 
16:47:35 UTC (rev 93413)
@@ -1,3 +1,8 @@
+2008-01-21  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * 
MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs:
+         Notify file changes through the FileService.
+
 2008-01-16  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * 
MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/LibSvnClient.cs:

Modified: 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/ChangeLog
===================================================================
--- 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/ChangeLog
       2008-01-21 16:44:57 UTC (rev 93412)
+++ 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/ChangeLog
       2008-01-21 16:47:35 UTC (rev 93413)
@@ -1,3 +1,8 @@
+2008-01-21  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.VersionControl/RevertCommand.cs: Notify file changes 
through
+         the FileService.
+
 2008-01-16  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.VersionControl.Views/Statuses.cs: Removed colorize 
method. Not

Modified: 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs
     2008-01-21 16:44:57 UTC (rev 93412)
+++ 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl/RevertCommand.cs
     2008-01-21 16:47:35 UTC (rev 93413)
@@ -83,6 +83,7 @@
                                                if (doc != null)
                                                        doc.Reload ();
                                                
VersionControlService.NotifyFileStatusChanged (vc, s, false);
+                                               FileService.NotifyFileChanged 
(s);
                                        }
                                        foreach (string s in dirs)
                                                
VersionControlService.NotifyFileStatusChanged (vc, s, true);

Modified: 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs
===================================================================
--- 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs
   2008-01-21 16:44:57 UTC (rev 93412)
+++ 
trunk/monodevelop/main/src/addins/VersionControl/MonoDevelop.VersionControl.Subversion/MonoDevelop.VersionControl.Subversion/SvnClient.cs
   2008-01-21 16:47:35 UTC (rev 93413)
@@ -22,6 +22,7 @@
                bool inProgress = false;
                
                IProgressMonitor updatemonitor;
+               ArrayList updateFileList;
                string commitmessage = null;
                
                // retain this so the delegates aren't GC'ed
@@ -425,12 +426,17 @@
                        }
                        
                        updatemonitor = monitor;
+                       updateFileList = new ArrayList ();
                        
                        LibSvnClient.Rev rev = LibSvnClient.Rev.Head;
                        IntPtr localpool = newpool (pool);
                        try {
                                CheckError (svn.client_update (IntPtr.Zero, 
path, ref rev, recurse ? 1 : 0, ctx, localpool));
                        } finally {
+                               foreach (string file in updateFileList)
+                                       FileService.NotifyFileChanged (file);
+                               updateFileList = null;
+                               
                                apr.pool_destroy (localpool);
                                updatemonitor = null;
                                inProgress = false;
@@ -721,17 +727,20 @@
                                                long revision)
                {
                        string actiondesc = action.ToString ();
+                       string file = Marshal.PtrToStringAnsi (path);
+                       bool notifyChange = false;
+                       
                        switch (action) {
                        case LibSvnClient.NotifyAction.UpdateAdd: actiondesc = 
"Added"; break;
                        case LibSvnClient.NotifyAction.UpdateDelete: actiondesc 
= "Deleted"; break;
-                       case LibSvnClient.NotifyAction.UpdateUpdate: actiondesc 
= "Updating"; break;
+                       case LibSvnClient.NotifyAction.UpdateUpdate: actiondesc 
= "Updating"; notifyChange = true; break;
                        case LibSvnClient.NotifyAction.UpdateExternal: 
actiondesc = "External Updated"; break;
                        case LibSvnClient.NotifyAction.UpdateCompleted: 
actiondesc = "Finished"; break;
                                
                        case LibSvnClient.NotifyAction.CommitAdded: actiondesc 
= "Added"; break;
                        case LibSvnClient.NotifyAction.CommitDeleted: 
actiondesc = "Deleted"; break;
-                       case LibSvnClient.NotifyAction.CommitModified: 
actiondesc = "Modified"; break;
-                       case LibSvnClient.NotifyAction.CommitReplaced: 
actiondesc = "Replaced"; break;
+                       case LibSvnClient.NotifyAction.CommitModified: 
actiondesc = "Modified"; notifyChange = true; break;
+                       case LibSvnClient.NotifyAction.CommitReplaced: 
actiondesc = "Replaced"; notifyChange = true; break;
                        case LibSvnClient.NotifyAction.CommitPostfixTxDelta: 
actiondesc = "Sending Content"; break;
                                /*Add,
                                 Copy,
@@ -747,7 +756,9 @@
                        }
                        
                        if (updatemonitor != null)
-                               updatemonitor.Log.WriteLine (actiondesc + " " + 
Marshal.PtrToStringAnsi (path));
+                               updatemonitor.Log.WriteLine (actiondesc + " " + 
file);
+                       if (updateFileList != null && notifyChange && 
File.Exists (file))
+                               updateFileList.Add (file);
                }
                
                public class StatusCollector {

_______________________________________________
Mono-patches maillist  -  Mono-patches@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to