anjuta r4577 - in trunk: . plugins/subversion



Author: jrliggett
Date: Mon Jan 12 01:54:03 2009
New Revision: 4577
URL: http://svn.gnome.org/viewvc/anjuta?rev=4577&view=rev

Log:
* plugins/subversion/subversion-vcs-interface.c
(subversion_ivcs_checkout), (on_ivcs_status_command_data_arrived),
(subversion_ivcs_query_status):
* plugins/subversion/subversion-vcs-interface.h:
Implement the checkout method for IAnjutaVcs in the Subversion plugin.
	
IAnjutaVcs is now completely implemented for the Subversion plugin.

Modified:
   trunk/ChangeLog
   trunk/plugins/subversion/subversion-vcs-interface.c
   trunk/plugins/subversion/subversion-vcs-interface.h

Modified: trunk/plugins/subversion/subversion-vcs-interface.c
==============================================================================
--- trunk/plugins/subversion/subversion-vcs-interface.c	(original)
+++ trunk/plugins/subversion/subversion-vcs-interface.c	Mon Jan 12 01:54:03 2009
@@ -67,7 +67,37 @@
 						  GCancellable *cancel,
 						  AnjutaAsyncNotify *notify, GError **err)
 {
-	/* Stub */
+	gchar *path;
+	SvnCheckoutCommand *checkout_command;
+	Subversion *plugin;
+	
+	path = g_file_get_path (dest);
+	checkout_command = svn_checkout_command_new (repository_location, path);
+	plugin = ANJUTA_PLUGIN_SUBVERSION (obj);
+	
+	g_free (path);
+	
+	create_message_view (plugin);
+	
+	g_signal_connect (G_OBJECT (checkout_command), "data-arrived",
+					  G_CALLBACK (on_command_info_arrived),
+					  plugin);
+	
+	if (cancel)
+	{
+		g_signal_connect_swapped (G_OBJECT (cancel), "cancelled",
+								  G_CALLBACK (anjuta_command_cancel),
+								  checkout_command);
+	}
+	
+	if (notify)
+	{
+		g_signal_connect_swapped (G_OBJECT (checkout_command), "finished",
+								  G_CALLBACK (anjuta_async_notify_notify_finished),
+								  notify);
+	}
+	
+	anjuta_command_start (ANJUTA_COMMAND (checkout_command));
 }
 
 static void
@@ -135,8 +165,9 @@
 	anjuta_command_start (ANJUTA_COMMAND (diff_command));
 }
 
+/* FIXME: The stuff in subversion-ui-utils.c should be namespaced. */
 static void
-on_status_command_data_arrived (AnjutaCommand *command, 
+on_ivcs_status_command_data_arrived (AnjutaCommand *command, 
 								IAnjutaVcsStatusCallback callback)
 {
 	GQueue *status_queue;
@@ -179,7 +210,7 @@
 	g_object_set_data (G_OBJECT (status_command), "user-data", user_data);
 	
 	g_signal_connect (G_OBJECT (status_command), "data-arrived",
-					  G_CALLBACK (on_status_command_data_arrived),
+					  G_CALLBACK (on_ivcs_status_command_data_arrived),
 					  callback);
 	
 	g_signal_connect (G_OBJECT (status_command), "finished",

Modified: trunk/plugins/subversion/subversion-vcs-interface.h
==============================================================================
--- trunk/plugins/subversion/subversion-vcs-interface.h	(original)
+++ trunk/plugins/subversion/subversion-vcs-interface.h	Mon Jan 12 01:54:03 2009
@@ -29,10 +29,13 @@
 #include <libanjuta/interfaces/ianjuta-vcs.h>
 
 #include "svn-add-command.h"
+#include "svn-checkout-command.h"
 #include "svn-diff-command.h"
 #include "svn-status-command.h"
 #include "svn-remove-command.h"
 
+#include "subversion-ui-utils.h"
+
 void subversion_ivcs_iface_init (IAnjutaVcsIface *iface);
 void subversion_ivcs_add (IAnjutaVcs *obj, GList *files, 
 						  AnjutaAsyncNotify *notify, GError **err);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]