[Goodies-commits] r6874 - in thunar-svn-plugin/trunk: . thunar-svn-plugin tsp-svn-helper

Peter de Ridder peter at xfce.org
Mon Mar 9 20:20:23 CET 2009


Author: peter
Date: 2009-03-09 19:20:23 +0000 (Mon, 09 Mar 2009)
New Revision: 6874

Modified:
   thunar-svn-plugin/trunk/README
   thunar-svn-plugin/trunk/configure.ac.in
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-provider.c
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.c
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.h
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.c
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.h
   thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-property-page.c
   thunar-svn-plugin/trunk/tsp-svn-helper/main.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-add.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-blame.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-checkout.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-commit.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.h
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-copy.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-delete.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-export.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-import.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-move.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-relocate.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.h
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-switch.c
   thunar-svn-plugin/trunk/tsp-svn-helper/tsh-update.c
Log:
changed all svn api functions to the 1.5 svn api
thunar svn plugin now requires libsvn version 1.5 or newer

Modified: thunar-svn-plugin/trunk/README
===================================================================
--- thunar-svn-plugin/trunk/README	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/README	2009-03-09 19:20:23 UTC (rev 6874)
@@ -25,7 +25,7 @@
 - Thunar
 - Thunar-VFS 0.4.0 or higher
 - Thunarx 0.4.0 or higher
-- libsvn 1.4 or higher
+- libsvn 1.5 or higher
 - libapr 0.9.7 or higher
 - gtk 2.6.0 or higher
 - glib 2.6.0 or higher

Modified: thunar-svn-plugin/trunk/configure.ac.in
===================================================================
--- thunar-svn-plugin/trunk/configure.ac.in	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/configure.ac.in	2009-03-09 19:20:23 UTC (rev 6874)
@@ -76,25 +76,25 @@
 AC_CHECK_LIB([svn_subr-1], [main], ,
 [
 	echo "*** The required library 'svn_subr-1' was not found on your system."
-	echo "*** Please install libsvn (atleast version 1.4)."
+	echo "*** Please install libsvn (atleast version 1.5)."
 	exit 1
 ])
 AC_CHECK_LIB([svn_fs-1], [main], ,
 [
 	echo "*** The required library 'svn_fs-1' was not found on your system."
-	echo "*** Please install libsvn (atleast version 1.4)."
+	echo "*** Please install libsvn (atleast version 1.5)."
 	exit 1
 ])
 AC_CHECK_LIB([svn_wc-1], [main], ,
 [
 	echo "*** The required library 'svn_wc-1' was not found on your system."
-	echo "*** Please install libsvn (atleast version 1.4)."
+	echo "*** Please install libsvn (atleast version 1.5)."
 	exit 1
 ])
 AC_CHECK_LIB([svn_client-1], [main], ,
 [
 	echo "*** The required library 'svn_wc-1' was not found on your system."
-	echo "*** Please install libsvn (atleast version 1.4)."
+	echo "*** Please install libsvn (atleast version 1.5)."
 	exit 1
 ])
 

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-provider.c
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-provider.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-provider.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -31,6 +31,8 @@
 
 #include <thunar-vfs/thunar-vfs.h>
 
+#include <subversion-1/svn_types.h>
+
 #include <thunar-svn-plugin/tsp-svn-backend.h>
 #include <thunar-svn-plugin/tsp-svn-action.h>
 #include <thunar-svn-plugin/tsp-svn-property-page.h>

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.c
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -293,7 +293,20 @@
     gtk_widget_set_tooltip_text(subitem, tooltip);
   gtk_menu_shell_append (GTK_MENU_SHELL (menu), subitem);
   gtk_widget_show(subitem);
-*//* No version control (parent) */
+*//* Version control (file) */
+  if (tsp_action->property.file_version_control)
+  {
+    subaction = gtk_action_new ("tsp::changelist", Q_("Menu|Changelist"), _("Changelist"), GTK_STOCK_INDEX);
+    g_object_set_qdata (G_OBJECT (subaction), tsp_action_arg_quark, "--changelist");
+    g_signal_connect_after (subaction, "activate", G_CALLBACK (tsp_action_exec), action);
+
+    subitem = gtk_action_create_menu_item (subaction);
+    g_object_get (G_OBJECT (subaction), "tooltip", &tooltip, NULL);
+    gtk_widget_set_tooltip_text(subitem, tooltip);
+    gtk_menu_shell_append (GTK_MENU_SHELL (menu), subitem);
+    gtk_widget_show(subitem);
+  }
+  /* No version control (parent) */
   if (tsp_action->property.is_parent && !tsp_action->property.parent_version_control)
   {
     subaction = gtk_action_new ("tsp::checkout", Q_("Menu|Checkout"), _("Checkout"), GTK_STOCK_CONNECT);

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.h
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.h	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-action.h	2009-03-09 19:20:23 UTC (rev 6874)
@@ -21,6 +21,7 @@
 #define __TSP_SVN_ACTION_H__
 
 #include <gtk/gtk.h>
+#include <thunarx/thunarx.h>
 
 G_BEGIN_DECLS;
 

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.c
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -205,8 +205,8 @@
 
   subpool = svn_pool_create (pool);
 
-	/* check for the path is a working copy */
-	err = svn_client_status2 (NULL, path, &revision, status_callback, &list, FALSE, TRUE, FALSE, TRUE, TRUE, ctx, subpool);
+	/* get the status of all files in the directory */
+	err = svn_client_status3 (NULL, path, &revision, status_callback, &list, svn_depth_immediates, TRUE, FALSE, TRUE, TRUE, NULL, ctx, subpool);
 
   svn_pool_destroy (subpool);
 
@@ -235,7 +235,7 @@
   TspSvnInfo **pinfo = baton;
   g_return_val_if_fail (*pinfo == NULL, SVN_NO_ERROR);
 
-  *pinfo = g_new (TspSvnInfo, 1);
+  *pinfo = g_new0 (TspSvnInfo, 1);
   (*pinfo)->path = g_strdup (path);
   (*pinfo)->url = g_strdup (info->URL);
   (*pinfo)->revision = info->rev;
@@ -243,6 +243,11 @@
   (*pinfo)->modrev = info->last_changed_rev;
   apr_ctime (((*pinfo)->moddate = g_new0(gchar, APR_CTIME_LEN)), info->last_changed_date);
   (*pinfo)->modauthor = g_strdup (info->last_changed_author);
+  if (((*pinfo)->has_wc_info = info->has_wc_info))
+  {
+    (*pinfo)->changelist = g_strdup (info->changelist);
+    (*pinfo)->depth =  info->depth;
+  }
 
   return SVN_NO_ERROR;
 }
@@ -265,7 +270,7 @@
 
 	gchar *path = g_strdup (uri);
 
-	/* remove trailing '/' cause svn_client_status2 can't handle that */
+	/* remove trailing '/' cause svn_client_info can't handle that */
 	if (path[strlen (path) - 1] == '/')
 	{
 		path[strlen (path) - 1] = '\0';
@@ -273,8 +278,8 @@
 
   subpool = svn_pool_create (pool);
 
-	/* check for the path is a working copy */
-	err = svn_client_info (path, &revision, &revision, info_callback, &info, FALSE, ctx, subpool);
+	/* get svn info for this file or directory */
+	err = svn_client_info2 (path, &revision, &revision, info_callback, &info, svn_depth_empty, NULL, ctx, subpool);
 
   svn_pool_destroy (subpool);
 
@@ -303,6 +308,10 @@
   g_free (info->repository);
   g_free (info->moddate);
   g_free (info->modauthor);
+  if(info->has_wc_info)
+  {
+    g_free (info->changelist);
+  }
 
   g_free (info);
 }

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.h
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.h	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-backend.h	2009-03-09 19:20:23 UTC (rev 6874)
@@ -20,8 +20,6 @@
 #ifndef __TSP_SVN_BACKEND_H__
 #define __TSP_SVN_BACKEND_H__
 
-#include <thunarx/thunarx.h>
-
 G_BEGIN_DECLS;
 
 typedef struct
@@ -38,11 +36,14 @@
 {
 	gchar *path;
   gchar *url;
-  glong revision;
+  svn_revnum_t revision;
   gchar *repository;
-  glong modrev;
+  svn_revnum_t modrev;
   gchar *moddate;
   gchar *modauthor;
+  gboolean has_wc_info;
+  gchar *changelist;
+  svn_depth_t depth;
 } TspSvnInfo;
 
 #define TSP_SVN_INFO(p) ((TspSvnInfo*)p)

Modified: thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-property-page.c
===================================================================
--- thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-property-page.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/thunar-svn-plugin/tsp-svn-property-page.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -25,15 +25,15 @@
 
 #include <thunar-vfs/thunar-vfs.h>
 
+#include <subversion-1/svn_types.h>
+
 #include <thunar-svn-plugin/tsp-svn-backend.h>
 #include <thunar-svn-plugin/tsp-svn-property-page.h>
 
 #include <string.h>
 
-#include <subversion-1/svn_types.h>
 
 
-
 struct _TspSvnPropertyPageClass
 {
 	ThunarxPropertyPageClass __parent__;
@@ -52,6 +52,8 @@
 	GtkWidget *modrev;
 	GtkWidget *moddate;
 	GtkWidget *modauthor;
+	GtkWidget *changelist;
+	GtkWidget *depth;
 };
 
 
@@ -109,7 +111,7 @@
 
   gtk_container_set_border_width (GTK_CONTAINER (self), 12);
 
-  table = gtk_table_new (7, 2, FALSE);
+  table = gtk_table_new (9, 2, FALSE);
   gtk_table_set_col_spacings (GTK_TABLE (table), 12);
   gtk_table_set_row_spacings (GTK_TABLE (table), 6);
 
@@ -193,10 +195,38 @@
   gtk_table_attach (GTK_TABLE (table), label, 1, 2, 6, 7, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
   gtk_widget_show (label);
 
-  /*TODO: lock*/
+  /* Alignment in the most simple widget to find, for just doing a size request */
+  spacer = g_object_new (GTK_TYPE_ALIGNMENT, "height-request", 12, NULL);
+  gtk_table_attach (GTK_TABLE (table), spacer, 0, 2, 7, 8, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (spacer);
 
-  /*TODO: wc info*/
+  label = gtk_label_new (_("Changelist:"));
+  gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
+  gtk_label_set_attributes (GTK_LABEL (label), attr_list);
+  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 8, 9, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (label);
 
+  self->changelist = label = gtk_label_new("");
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+  gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 8, 9, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (label);
+
+  label = gtk_label_new (_("Depth:"));
+  gtk_misc_set_alignment (GTK_MISC (label), 1.0f, 0.5f);
+  gtk_label_set_attributes (GTK_LABEL (label), attr_list);
+  gtk_table_attach (GTK_TABLE (table), label, 0, 1, 9, 10, GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (label);
+
+  self->depth = label = gtk_label_new(_("Unknown"));
+  gtk_misc_set_alignment (GTK_MISC (label), 0.0f, 0.5f);
+  gtk_label_set_selectable (GTK_LABEL (label), TRUE);
+  gtk_table_attach (GTK_TABLE (table), label, 1, 2, 9, 10, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+  gtk_widget_show (label);
+
+  /*TODO: kind, repos UUID, lock
+   * wc info: size, schedule, copy from, text time, prop time, checksum, confilct, prejfile, working size */
+
   gtk_container_add (GTK_CONTAINER (self), table);
   gtk_widget_show (GTK_WIDGET (table));
 }
@@ -257,6 +287,38 @@
 
 
 
+const gchar *
+depth_to_string(svn_depth_t depth)
+{
+  const gchar *depth_string;
+
+	switch(depth)
+	{
+    default:
+    case svn_depth_unknown:
+      depth_string = _("Unknown");
+      break;
+    case svn_depth_exclude:
+      depth_string = _("Exclude");
+      break;
+    case svn_depth_empty:
+      depth_string = _("Empty");
+      break;
+    case svn_depth_files:
+      depth_string = _("Files");
+      break;
+    case svn_depth_immediates:
+      depth_string = _("Immediates");
+      break;
+    case svn_depth_infinity:
+      depth_string = _("Infinity");
+      break;
+	}
+  return depth_string;
+}
+
+
+
 static void
 tsp_svn_property_page_file_changed (ThunarxFileInfo *file, TspSvnPropertyPage *page)
 {
@@ -296,6 +358,13 @@
     g_free (tmpstr);
     gtk_label_set_text (GTK_LABEL (page->moddate), info->moddate);
     gtk_label_set_text (GTK_LABEL (page->modauthor), info->modauthor);
+    if(info->has_wc_info)
+    {
+      if(info->changelist)
+        gtk_label_set_text (GTK_LABEL (page->changelist), info->changelist);
+      if(info->depth)
+        gtk_label_set_text (GTK_LABEL (page->depth), depth_to_string(info->depth));
+    }
 
     tsp_svn_info_free (info);
   }

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/main.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/main.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/main.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -34,6 +34,7 @@
 #include "tsh-common.h"
 #include "tsh-add.h"
 #include "tsh-blame.h"
+//#include "tsh-changelist.h"
 #include "tsh-checkout.h"
 #include "tsh-cleanup.h"
 #include "tsh-commit.h"
@@ -74,6 +75,7 @@
 	gboolean print_version = FALSE;
 	gboolean add = FALSE;
 	gboolean blame = FALSE;
+	gboolean changelist = FALSE;
 	gboolean checkout = FALSE;
 	gboolean cleanup = FALSE;
 	gboolean commit = FALSE;
@@ -117,6 +119,12 @@
 		{ NULL, '\0', 0, 0, NULL, NULL, NULL }
 	};
 
+	GOptionEntry changelist_options_table[] =
+	{
+		{ "changelist", '\0', 0, G_OPTION_ARG_NONE, &changelist, N_("Execute changelist action"), NULL },
+		{ NULL, '\0', 0, 0, NULL, NULL, NULL }
+	};
+
 	GOptionEntry checkout_options_table[] =
 	{
 		{ "checkout", '\0', 0, G_OPTION_ARG_NONE, &checkout, N_("Execute checkout action"), NULL },
@@ -243,6 +251,10 @@
 	g_option_group_add_entries(option_group, blame_options_table);
 	g_option_context_add_group(option_context, option_group);
 
+	option_group = g_option_group_new("changelist", N_("Changelist Related Options:"), N_("Blame"), NULL, NULL);
+	g_option_group_add_entries(option_group, changelist_options_table);
+	g_option_context_add_group(option_context, option_group);
+
 	option_group = g_option_group_new("checkout", N_("Checkout Related Options:"), N_("Checkout"), NULL, NULL);
 	g_option_group_add_entries(option_group, checkout_options_table);
 	g_option_context_add_group(option_context, option_group);
@@ -350,7 +362,7 @@
 		return EXIT_FAILURE;
 	}
 
-  if(add || blame || delete || revert || resolved)
+  if(add || blame || delete || revert || resolved || changelist)
   {
     if(!g_strv_length(files))
     {
@@ -370,6 +382,11 @@
 		thread = tsh_blame(files, svn_ctx, pool);
 	}
 
+	if(changelist)
+	{
+		//thread = tsh_changelist(files, svn_ctx, pool);
+	}
+
 	if(checkout)
 	{
 		thread = tsh_checkout(files, svn_ctx, pool);

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-add.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-add.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-add.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -66,7 +66,7 @@
 	{
 		for (i = 0; i < size; i++)
 		{
-      if ((err = svn_client_add3(files[i], TRUE, FALSE, FALSE, ctx, subpool)))
+      if ((err = svn_client_add4(files[i], svn_depth_infinity, FALSE, FALSE, FALSE, ctx, subpool)))
       {
         error_str = tsh_strerror(err);
         gdk_threads_enter();
@@ -82,7 +82,7 @@
 	}
 	else
 	{
-    if ((err = svn_client_add3("", TRUE, FALSE, FALSE, ctx, subpool)))
+    if ((err = svn_client_add4("", svn_depth_infinity, FALSE, FALSE, FALSE, ctx, subpool)))
     {
       error_str = tsh_strerror(err);
       gdk_threads_enter();

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-blame.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-blame.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-blame.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -64,7 +64,7 @@
   start.kind = svn_opt_revision_number;
   start.value.number = 0;
   end.kind = svn_opt_revision_head;
-	if ((err = svn_client_blame3(file, &revision, &start, &end, &diff_options, FALSE, tsh_blame_func, dialog, ctx, subpool)))
+	if ((err = svn_client_blame4(file, &revision, &start, &end, &diff_options, FALSE, FALSE, tsh_blame_func2, dialog, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-checkout.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-checkout.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-checkout.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -62,7 +62,7 @@
   subpool = svn_pool_create (pool);
 
   revision.kind = svn_opt_revision_head;
-	if ((err = svn_client_checkout2(NULL, url, path, &revision, &revision, TRUE, FALSE, ctx, subpool)))
+	if ((err = svn_client_checkout3(NULL, url, path, &revision, &revision, svn_depth_infinity, FALSE, FALSE, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-commit.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-commit.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-commit.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -82,7 +82,7 @@
     APR_ARRAY_PUSH (paths, const char *) = ""; // current directory
   }
 
-	if ((err = svn_client_commit3(&commit_info, paths, TRUE, FALSE, ctx, subpool)))
+	if ((err = svn_client_commit4(&commit_info, paths, svn_depth_empty, FALSE, FALSE, NULL, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -44,6 +44,7 @@
 #include "tsh-log-message-dialog.h"
 #include "tsh-log-dialog.h"
 #include "tsh-blame-dialog.h"
+#include "tsh-properties-dialog.h"
 
 #include "tsh-common.h"
 
@@ -479,7 +480,14 @@
     N_("Locked"),
     N_("Unlocked"),
     N_("Lock failed"),
-    N_("Unlock failed")
+    N_("Unlock failed"),
+    N_("Exists"),
+    N_("Changelist set"),
+    N_("Changelist cleared"),
+    N_("Changelist moved"),
+    N_("Merge begin"),
+    N_("Foreign merge begin"),
+    N_("Replace")
   };
 
   const gchar *action_string = N_("Unknown");
@@ -511,6 +519,13 @@
     case svn_wc_notify_unlocked:
     case svn_wc_notify_failed_lock:
     case svn_wc_notify_failed_unlock:
+    case svn_wc_notify_exists:
+    case svn_wc_notify_changelist_set:
+    case svn_wc_notify_changelist_clear:
+    case svn_wc_notify_changelist_moved:
+    case svn_wc_notify_merge_begin:
+    case svn_wc_notify_foreign_merge_begin:
+    case svn_wc_notify_update_replace:
       action_string = action_table[action];
       break;
 	}
@@ -727,19 +742,35 @@
 }
 
 svn_error_t *
-tsh_log_func (void *baton, apr_hash_t *changed_paths, svn_revnum_t revision, const char *author, const char *date, const char *message, apr_pool_t *pool)
+tsh_log_func (void *baton, svn_log_entry_t *log_entry, apr_pool_t *pool)
 {
+  apr_hash_t *changed_paths = log_entry->changed_paths;
+  apr_hash_t *revprops = log_entry->revprops;
   apr_time_t date_val;
-  gchar *date_str = NULL;
+  svn_string_t *value;
+  gchar *author = NULL;
+  gchar *date = NULL;
+  gchar *message = NULL;
   GSList *files = NULL;
 	TshLogDialog *dialog = TSH_LOG_DIALOG (baton);
 
-  if(date)
+  value = apr_hash_get(revprops, SVN_PROP_REVISION_AUTHOR, APR_HASH_KEY_STRING);
+  if(value)
+    author = g_strndup (value->data, value->len);
+
+  value = apr_hash_get(revprops, SVN_PROP_REVISION_DATE, APR_HASH_KEY_STRING);
+  if(value)
   {
+    date = g_strndup (value->data, value->len);
     svn_time_from_cstring(&date_val, date, pool);
-    apr_ctime((date_str = g_new0(gchar, APR_CTIME_LEN)), date_val);
+    g_free(date);
+    apr_ctime((date = g_new0(gchar, APR_CTIME_LEN)), date_val);
   }
 
+  value = apr_hash_get(revprops, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING);
+  if(value)
+    message = g_strndup (value->data, value->len);
+
   if(changed_paths)
   {
     apr_hash_index_t *hi;
@@ -756,16 +787,18 @@
   }
 
   gdk_threads_enter();
-  tsh_log_dialog_add(dialog, files, revision, author, date_str, message);
+  tsh_log_dialog_add(dialog, files, log_entry->revision, author, date, message);
   gdk_threads_leave();
 
-  g_free(date_str);
+  g_free(author);
+  g_free(date);
+  g_free(message);
 
 	return SVN_NO_ERROR;
 }
 
 svn_error_t *
-tsh_blame_func (void *baton, apr_int64_t line_no, svn_revnum_t revision, const char *author, const char *date, const char *line, apr_pool_t *pool)
+tsh_blame_func2 (void *baton, apr_int64_t line_no, svn_revnum_t revision, const char *author, const char *date, svn_revnum_t merged_revision, const char *merged_author, const char *merged_date, const char *merged_path, const char *line, apr_pool_t *pool)
 {
   apr_time_t date_val;
   gchar *date_str = NULL;
@@ -786,6 +819,27 @@
 	return SVN_NO_ERROR;
 }
 
+svn_error_t *
+tsh_proplist_func (void *baton, const char *path, apr_hash_t *prop_hash, apr_pool_t *pool)
+{
+  TshPropertiesDialog *dialog = TSH_PROPERTIES_DIALOG (baton);
+  apr_hash_index_t *hi;
+
+  for (hi = apr_hash_first(pool, prop_hash); hi; hi = apr_hash_next(hi)) {
+    const char *name;
+    svn_string_t *value;
+    gchar *str_value;
+    apr_hash_this(hi, (const void**)&name, NULL, (void**)&value);
+    str_value = g_strndup (value->data, value->len);
+    gdk_threads_enter();
+    tsh_properties_dialog_add (dialog, name, str_value);
+    gdk_threads_leave();
+    g_free (str_value);
+  }
+
+  return SVN_NO_ERROR;
+}
+
 gchar *
 tsh_strerror(svn_error_t *err)
 {

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.h	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-common.h	2009-03-09 19:20:23 UTC (rev 6874)
@@ -30,8 +30,9 @@
 void         tsh_notify_func2  (void *, const svn_wc_notify_t *, apr_pool_t *);
 void         tsh_status_func2  (void *, const char *, svn_wc_status2_t *);
 svn_error_t *tsh_log_msg_func2 (const char **, const char **, const apr_array_header_t *, void *, apr_pool_t *);
-svn_error_t *tsh_log_func      (void *, apr_hash_t *, svn_revnum_t, const char *, const char *, const char *, apr_pool_t *);
-svn_error_t *tsh_blame_func    (void *, apr_int64_t, svn_revnum_t, const char *, const char *, const char *, apr_pool_t *);
+svn_error_t *tsh_log_func      (void *, svn_log_entry_t *, apr_pool_t *);
+svn_error_t *tsh_blame_func2   (void *, apr_int64_t, svn_revnum_t, const char *, const char *, svn_revnum_t, const char *, const char *, const char *, const char *, apr_pool_t *);
+svn_error_t *tsh_proplist_func (void *, const char *, apr_hash_t *, apr_pool_t *);
 
 gchar       *tsh_strerror  (svn_error_t *);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-copy.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-copy.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-copy.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -51,6 +51,8 @@
 	svn_error_t *err;
   svn_opt_revision_t revision;
   svn_commit_info_t *commit_info;
+  apr_array_header_t *paths;
+  svn_client_copy_source_t copy_source;
 	svn_client_ctx_t *ctx = args->ctx;
 	apr_pool_t *subpool, *pool = args->pool;
   TshNotifyDialog *dialog = args->dialog;
@@ -64,8 +66,15 @@
 
   subpool = svn_pool_create (pool);
 
+    paths = apr_array_make (subpool, 1, sizeof (svn_client_copy_source_t *));
+
   revision.kind = svn_opt_revision_unspecified;
-	if ((err = svn_client_copy3(&commit_info, from, &revision, to, ctx, subpool)))
+    copy_source.path = from;
+    copy_source.revision = &revision;
+    copy_source.peg_revision = &revision;
+    APR_ARRAY_PUSH (paths, svn_client_copy_source_t *) = &copy_source;
+
+	if ((err = svn_client_copy4(&commit_info, paths, to, FALSE, FALSE, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-delete.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-delete.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-delete.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -82,7 +82,7 @@
     APR_ARRAY_PUSH (paths, const char *) = ""; // current directory
   }
 
-	if ((err = svn_client_delete2(&commit_info, paths, FALSE, ctx, subpool)))
+	if ((err = svn_client_delete3(&commit_info, paths, FALSE, FALSE, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-export.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-export.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-export.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -63,7 +63,7 @@
 
   peg_revision.kind = svn_opt_revision_unspecified;
   revision.kind = svn_opt_revision_head;
-	if ((err = svn_client_export3(NULL, url, path, &peg_revision, &revision, TRUE, FALSE, TRUE, NULL, ctx, subpool)))
+	if ((err = svn_client_export4(NULL, url, path, &peg_revision, &revision, TRUE, FALSE, svn_depth_infinity, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-file-selection-dialog.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -166,7 +166,7 @@
   {
     while (*files)
     {
-      if((err = svn_client_status2(NULL, *files, &revision, tsh_file_selection_status_func2, dialog, selection_flags&TSH_FILE_SELECTION_FLAG_RECURSIVE, selection_flags&TSH_FILE_SELECTION_FLAG_UNCHANGED, FALSE, selection_flags&TSH_FILE_SELECTION_FLAG_IGNORED, TRUE, ctx, subpool)))
+      if((err = svn_client_status3(NULL, *files, &revision, tsh_file_selection_status_func2, dialog, (selection_flags&TSH_FILE_SELECTION_FLAG_RECURSIVE)?svn_depth_infinity:svn_depth_immediates, selection_flags&TSH_FILE_SELECTION_FLAG_UNCHANGED, FALSE, selection_flags&TSH_FILE_SELECTION_FLAG_IGNORED, TRUE, NULL, ctx, subpool)))
       {
         svn_pool_destroy (subpool);
 
@@ -180,7 +180,7 @@
   }
   else
   {
-    if((err = svn_client_status2(NULL, "", &revision, tsh_file_selection_status_func2, dialog, selection_flags&TSH_FILE_SELECTION_FLAG_RECURSIVE, selection_flags&TSH_FILE_SELECTION_FLAG_UNCHANGED, FALSE, selection_flags&TSH_FILE_SELECTION_FLAG_IGNORED, TRUE, ctx, subpool)))
+    if((err = svn_client_status3(NULL, "", &revision, tsh_file_selection_status_func2, dialog, (selection_flags&TSH_FILE_SELECTION_FLAG_RECURSIVE)?svn_depth_infinity:svn_depth_immediates, selection_flags&TSH_FILE_SELECTION_FLAG_UNCHANGED, FALSE, selection_flags&TSH_FILE_SELECTION_FLAG_IGNORED, TRUE, NULL, ctx, subpool)))
     {
       svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-import.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-import.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-import.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -63,7 +63,7 @@
 
   subpool = svn_pool_create (pool);
 
-	if ((err = svn_client_import2(&commit_info, path, url, FALSE, FALSE, ctx, subpool)))
+	if ((err = svn_client_import3(&commit_info, path, url, svn_depth_infinity, FALSE, FALSE, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-log.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -87,7 +87,7 @@
   start.kind = svn_opt_revision_head;
   end.kind = svn_opt_revision_number;
   end.value.number = 0;
-	if ((err = svn_client_log3(paths, &revision, &start, &end, 0, TRUE, FALSE, tsh_log_func, dialog, ctx, subpool)))
+	if ((err = svn_client_log4(paths, &revision, &start, &end, 0, TRUE, FALSE, FALSE, NULL, tsh_log_func, dialog, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-move.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-move.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-move.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -50,6 +50,7 @@
 	struct thread_args *args = user_data;
 	svn_error_t *err;
   svn_commit_info_t *commit_info;
+  apr_array_header_t *paths;
 	svn_client_ctx_t *ctx = args->ctx;
 	apr_pool_t *subpool, *pool = args->pool;
   TshNotifyDialog *dialog = args->dialog;
@@ -63,7 +64,11 @@
 
   subpool = svn_pool_create (pool);
 
-	if ((err = svn_client_move4(&commit_info, from, to, FALSE, ctx, subpool)))
+    paths = apr_array_make (subpool, 1, sizeof (const char *));
+
+    APR_ARRAY_PUSH (paths, const char *) = from;
+
+	if ((err = svn_client_move5(&commit_info, paths, to, FALSE, FALSE, FALSE, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -42,7 +42,7 @@
 	GtkWidget *tree_view;
   GtkWidget *combo_box;
   GtkWidget *text_view;
-  GtkWidget *recursive;
+  GtkWidget *depth;
 	GtkWidget *set;
 	GtkWidget *delete;
 	GtkWidget *close;
@@ -104,12 +104,13 @@
 	GtkWidget *tree_view;
 	GtkWidget *combo_box;
 	GtkWidget *text_view;
-  GtkWidget *recursive;
+  GtkWidget *depth;
 	GtkWidget *scroll_window;
   GtkWidget *vpane;
   GtkWidget *box;
 	GtkCellRenderer *renderer;
 	GtkTreeModel *model;
+    GtkTreeIter iter;
   GtkEntryCompletion *completion;
 
   vpane = gtk_vpaned_new ();
@@ -155,6 +156,7 @@
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_EXTERNALS);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_IGNORE);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_KEYWORDS);
+  gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_MERGEINFO);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_MIME_TYPE);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_NEEDS_LOCK);
   gtk_combo_box_append_text (GTK_COMBO_BOX (combo_box), SVN_PROP_SPECIAL);
@@ -178,10 +180,61 @@
 	gtk_widget_show (text_view);
 	gtk_widget_show (scroll_window);
 
-  dialog->recursive = recursive = gtk_check_button_new_with_label (_("Modify Property Recursive"));
-  gtk_box_pack_start (GTK_BOX(box), recursive, FALSE, TRUE, 0);
-	gtk_widget_show (recursive);
+	dialog->depth = depth = gtk_combo_box_new ();
 
+	model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
+
+	gtk_combo_box_set_model (GTK_COMBO_BOX (depth), model);
+
+    /*
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Unknown"),
+	                    1, svn_depth_unknown,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Exclude"),
+	                    1, svn_depth_exclude,
+	                    -1);
+    */
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Self"),
+	                    1, svn_depth_empty,
+	                    -1);
+
+    gtk_combo_box_set_active_iter (GTK_COMBO_BOX (depth), &iter);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Immediate files"),
+	                    1, svn_depth_files,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Immediates"),
+	                    1, svn_depth_immediates,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Recursive"),
+	                    1, svn_depth_infinity,
+	                    -1);
+
+	g_object_unref (model);
+
+	renderer = gtk_cell_renderer_text_new ();
+    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (depth), renderer, TRUE);
+    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (depth), renderer, "text", 0);
+
+  gtk_box_pack_start (GTK_BOX(box), depth, FALSE, TRUE, 0);
+	gtk_widget_show (depth);
+
   gtk_paned_pack2 (GTK_PANED(vpane), box, TRUE, FALSE);
   gtk_widget_show (box);
 
@@ -386,12 +439,29 @@
   return gtk_text_buffer_get_text (buffer, &start, &end, FALSE);
 }
 
-gboolean
-tsh_properties_dialog_get_recursive (TshPropertiesDialog *dialog)
+svn_depth_t
+tsh_properties_dialog_get_depth (TshPropertiesDialog *dialog)
 {
-  g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), FALSE);
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  svn_depth_t depth;
+  GValue value;
 
-  return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->recursive));
+  memset(&value, 0, sizeof(GValue));
+
+  g_return_val_if_fail (TSH_IS_PROPERTIES_DIALOG (dialog), svn_depth_unknown);
+
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (dialog->depth), &iter))
+     return svn_depth_unknown;
+
+  model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->depth));
+  gtk_tree_model_get_value (model, &iter, 1, &value);
+
+  depth = g_value_get_int (&value);
+
+  g_value_unset(&value);
+
+  return depth;
 }
 
 static void

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties-dialog.h	2009-03-09 19:20:23 UTC (rev 6874)
@@ -34,31 +34,23 @@
 #define TSH_IS_PROPERTIES_DIALOG_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE ((klass), TSH_TYPE_PROPERTIES_DIALOG))
 #define TSH_PROPERTIES_DIALOG_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS ((obj), TSH_TYPE_PROPERTIES_DIALOG, TshPropertiesDialogClass))
 
-typedef struct
-{
-  const gchar *action;
-  gchar *file;
-} TshLogFile;
+GType       tsh_properties_dialog_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
 
-#define TSH_LOG_FILE(p) ((TshLogFile*)p)
+GtkWidget*  tsh_properties_dialog_new      (const gchar *title,
+                                            GtkWindow *parent,
+                                            GtkDialogFlags flags) G_GNUC_MALLOC G_GNUC_INTERNAL;
 
-GType      tsh_properties_dialog_get_type (void) G_GNUC_CONST G_GNUC_INTERNAL;
+void        tsh_properties_dialog_add      (TshPropertiesDialog *dialog,
+                                            const char *name,
+                                            const char *value);
+void        tsh_properties_dialog_done     (TshPropertiesDialog *dialog);
 
-GtkWidget* tsh_properties_dialog_new      (const gchar *title,
-                                           GtkWindow *parent,
-                                           GtkDialogFlags flags) G_GNUC_MALLOC G_GNUC_INTERNAL;
 
-void       tsh_properties_dialog_add      (TshPropertiesDialog *dialog,
-                                           const char *name,
-                                           const char *value);
-void       tsh_properties_dialog_done     (TshPropertiesDialog *dialog);
+gchar      *tsh_properties_dialog_get_key          (TshPropertiesDialog *dialog);
+gchar      *tsh_properties_dialog_get_selected_key (TshPropertiesDialog *dialog);
+gchar      *tsh_properties_dialog_get_value        (TshPropertiesDialog *dialog);
+svn_depth_t tsh_properties_dialog_get_depth        (TshPropertiesDialog *dialog);
 
-
-gchar     *tsh_properties_dialog_get_key          (TshPropertiesDialog *dialog);
-gchar     *tsh_properties_dialog_get_selected_key (TshPropertiesDialog *dialog);
-gchar     *tsh_properties_dialog_get_value        (TshPropertiesDialog *dialog);
-gboolean   tsh_properties_dialog_get_recursive    (TshPropertiesDialog *dialog);
-
 G_END_DECLS;
 
 #endif /* !__TSH_PROPERTIES_DIALOG_H__ */

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-properties.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -43,7 +43,7 @@
 	gchar *path;
   gchar *set_key;
   gchar *set_value;
-  gboolean recursive;
+  gboolean depth;
 };
 
 static gpointer properties_thread (gpointer user_data)
@@ -57,9 +57,8 @@
 	gchar *path = args->path;
   gchar *set_key = args->set_key;
   gchar *set_value = args->set_value;
-  gboolean recursive = args->recursive;
+  gboolean depth = args->depth;
   svn_string_t *value;
-  apr_array_header_t *prop_items;
   GtkWidget *error;
   gchar *error_str;
 
@@ -72,7 +71,7 @@
   {
     value = set_value?svn_string_create(set_value, subpool):NULL;
 
-    if ((err = svn_client_propset2(set_key, value, path, recursive, FALSE, ctx, subpool)))
+    if ((err = svn_client_propset3(NULL, set_key, value, path, depth, FALSE, SVN_INVALID_REVNUM, NULL, NULL, ctx, subpool)))
     {
       //svn_pool_destroy (subpool);
       error_str = tsh_strerror(err);
@@ -94,7 +93,7 @@
   g_free (set_value);
 
   revision.kind = svn_opt_revision_unspecified;
-	if ((err = svn_client_proplist2(&prop_items, path, &revision, &revision, FALSE, ctx, subpool)))
+	if ((err = svn_client_proplist3(path, &revision, &revision, svn_depth_empty, NULL, tsh_proplist_func, dialog, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 
@@ -113,27 +112,6 @@
 		return GINT_TO_POINTER (FALSE);
 	}
 
-  if(prop_items)
-  {
-    if(prop_items->nelts)
-    {
-      apr_hash_index_t *hi;
-      svn_client_proplist_item_t *item = APR_ARRAY_IDX(prop_items, 0, svn_client_proplist_item_t*);
-
-      for (hi = apr_hash_first(subpool, item->prop_hash); hi; hi = apr_hash_next(hi)) {
-        const char *name;
-        svn_string_t *value;
-        gchar *str_value;
-        apr_hash_this(hi, (const void**)&name, NULL, (void**)&value);
-        str_value = g_strndup (value->data, value->len);
-        gdk_threads_enter();
-        tsh_properties_dialog_add (dialog, name, str_value);
-        gdk_threads_leave();
-        g_free (str_value);
-      }
-    }
-  }
-
   svn_pool_destroy (subpool);
 
   gdk_threads_enter();
@@ -157,7 +135,7 @@
 {
   args->set_key = tsh_properties_dialog_get_key (dialog);
   args->set_value = tsh_properties_dialog_get_value (dialog);
-  args->recursive = tsh_properties_dialog_get_recursive (dialog);
+  args->depth = tsh_properties_dialog_get_depth (dialog);
 
   create_properties_thread (dialog, args);
 }
@@ -192,7 +170,7 @@
 	args->path = path;
   args->set_key = NULL;
   args->set_value = NULL;
-  args->recursive = FALSE;
+  args->depth = svn_depth_unknown;
 
   g_signal_connect(dialog, "set-clicked", G_CALLBACK(set_property), args);
   g_signal_connect(dialog, "delete-clicked", G_CALLBACK(delete_property), args);

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-relocate.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-relocate.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-relocate.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -91,32 +91,27 @@
 	return GINT_TO_POINTER (TRUE);
 }
 
-static svn_error_t* info_callback(void *baton, const char *path, const svn_info_t *info, apr_pool_t *pool)
-{
-  (*((gchar**)baton)) = g_strdup(info->URL);
-  return NULL;
-}
-
 GThread *tsh_relocate (gchar **files, svn_client_ctx_t *ctx, apr_pool_t *pool)
 {
 	struct thread_args *args;
+  const char *url = NULL;
   gchar *repository = NULL;
   gchar *from;
   gchar *to;
   GtkWidget *dialog;
   gchar *path;
 	apr_pool_t *subpool;
-	svn_opt_revision_t revision = {svn_opt_revision_unspecified};
 
   path = files?files[0]:NULL;
 
   subpool = svn_pool_create(pool);
 
-  svn_error_clear(svn_client_info(path?path:"", &revision, &revision, info_callback, &repository, FALSE, ctx, subpool));
+  svn_error_clear(svn_client_url_from_path(&url, path?path:"", subpool));
+  repository = g_strdup(url);
 
   svn_pool_destroy(subpool);
 
-	dialog = tsh_relocate_dialog_new (_("Switch"), NULL, 0, repository, repository, path);
+	dialog = tsh_relocate_dialog_new (_("Relocate"), NULL, 0, repository, repository, path);
   g_free(repository);
 	if(gtk_dialog_run (GTK_DIALOG (dialog)) != GTK_RESPONSE_OK)
   {

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-resolved.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -66,7 +66,7 @@
 	{
 		for (i = 0; i < size; i++)
 		{
-      if ((err = svn_client_resolved(files[i], FALSE, ctx, subpool)))
+      if ((err = svn_client_resolve(files[i], svn_depth_empty, svn_wc_conflict_choose_merged, ctx, subpool)))
       {
         error_str = tsh_strerror(err);
         gdk_threads_enter();
@@ -82,7 +82,7 @@
 	}
 	else
 	{
-    if ((err = svn_client_resolved("", FALSE, ctx, subpool)))
+    if ((err = svn_client_resolve("", svn_depth_empty, svn_wc_conflict_choose_merged, ctx, subpool)))
     {
       error_str = tsh_strerror(err);
       gdk_threads_enter();

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-revert.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -78,7 +78,7 @@
 		APR_ARRAY_PUSH (paths, const char *) = ""; // current directory
 	}
 
-	if ((err = svn_client_revert(paths, FALSE, ctx, subpool)))
+	if ((err = svn_client_revert2(paths, svn_depth_empty, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -37,7 +37,7 @@
 	GtkDialog dialog;
 
 	GtkWidget *tree_view;
-  GtkWidget *recursive;
+  GtkWidget *depth;
   GtkWidget *get_all;
   GtkWidget *unversioned;
   GtkWidget *update;
@@ -95,7 +95,7 @@
 	GtkWidget *button;
 	GtkWidget *tree_view;
 	GtkWidget *scroll_window;
-	GtkWidget *recursive;
+	GtkWidget *depth;
 	GtkWidget *get_all;
 	GtkWidget *unversioned;
 	GtkWidget *update;
@@ -104,6 +104,7 @@
   GtkWidget *table;
 	GtkCellRenderer *renderer;
 	GtkTreeModel *model;
+    GtkTreeIter iter;
 
 	scroll_window = gtk_scrolled_window_new (NULL, NULL);
 	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
@@ -153,11 +154,61 @@
 
   table = gtk_table_new (3, 2, FALSE);
 
-	dialog->recursive = recursive = gtk_check_button_new_with_label (_("Show Recursive"));
-  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (recursive), TRUE);
-  gtk_table_attach (GTK_TABLE (table), recursive, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
-	gtk_widget_show (recursive);
+	dialog->depth = depth = gtk_combo_box_new ();
 
+	model = GTK_TREE_MODEL (gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT));
+
+	gtk_combo_box_set_model (GTK_COMBO_BOX (depth), model);
+
+    /*
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Unknown"),
+	                    1, svn_depth_unknown,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Exclude"),
+	                    1, svn_depth_exclude,
+	                    -1);
+    */
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Self"),
+	                    1, svn_depth_empty,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Immediate files"),
+	                    1, svn_depth_files,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Immediates"),
+	                    1, svn_depth_immediates,
+	                    -1);
+
+	gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+	gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+	                    0, _("Recursive"),
+	                    1, svn_depth_infinity,
+	                    -1);
+
+    gtk_combo_box_set_active_iter (GTK_COMBO_BOX (depth), &iter);
+
+	g_object_unref (model);
+
+	renderer = gtk_cell_renderer_text_new ();
+    gtk_cell_layout_pack_start(GTK_CELL_LAYOUT (depth), renderer, TRUE);
+    gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (depth), renderer, "text", 0);
+
+  gtk_table_attach (GTK_TABLE (table), depth, 0, 1, 0, 1, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
+	gtk_widget_show (depth);
+
 	dialog->get_all = get_all = gtk_check_button_new_with_label (_("Show Unmodified Files"));
   gtk_table_attach (GTK_TABLE (table), get_all, 0, 1, 1, 2, GTK_EXPAND | GTK_FILL, GTK_FILL, 0, 0);
 	gtk_widget_show (get_all);
@@ -253,12 +304,29 @@
 	gtk_widget_show (dialog->refresh);
 }
 
-gboolean
-tsh_status_dialog_get_show_recursive (TshStatusDialog *dialog)
+svn_depth_t
+tsh_status_dialog_get_depth (TshStatusDialog *dialog)
 {
-  g_return_val_if_fail (TSH_IS_STATUS_DIALOG (dialog), FALSE);
+  GtkTreeModel *model;
+  GtkTreeIter iter;
+  svn_depth_t depth;
+  GValue value;
 
-  return gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (dialog->recursive));
+  memset(&value, 0, sizeof(GValue));
+
+  g_return_val_if_fail (TSH_IS_STATUS_DIALOG (dialog), svn_depth_unknown);
+
+  if (!gtk_combo_box_get_active_iter (GTK_COMBO_BOX (dialog->depth), &iter))
+     return svn_depth_unknown;
+
+  model = gtk_combo_box_get_model (GTK_COMBO_BOX (dialog->depth));
+  gtk_tree_model_get_value (model, &iter, 1, &value);
+
+  depth = g_value_get_int (&value);
+
+  g_value_unset(&value);
+
+  return depth;
 }
 
 gboolean

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.h
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.h	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status-dialog.h	2009-03-09 19:20:23 UTC (rev 6874)
@@ -48,7 +48,7 @@
                                        const char *repo_prop);
 void       tsh_status_dialog_done     (TshStatusDialog *dialog);
 
-gboolean   tsh_status_dialog_get_show_recursive   (TshStatusDialog *dialog);
+gboolean   tsh_status_dialog_get_depth            (TshStatusDialog *dialog);
 gboolean   tsh_status_dialog_get_show_unmodified  (TshStatusDialog *dialog);
 gboolean   tsh_status_dialog_get_show_unversioned (TshStatusDialog *dialog);
 gboolean   tsh_status_dialog_get_check_reposetory (TshStatusDialog *dialog);

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-status.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -52,7 +52,7 @@
 	apr_pool_t *subpool, *pool = args->pool;
 	TshStatusDialog *dialog = args->dialog;
 	gchar **files = args->files;
-  gboolean recursive;
+  svn_depth_t depth;
   gboolean get_all;
   gboolean update;
   gboolean no_ignore;
@@ -61,7 +61,7 @@
   gchar *error_str;
 
   gdk_threads_enter();
-  recursive = tsh_status_dialog_get_show_recursive(dialog);
+  depth = tsh_status_dialog_get_depth(dialog);
   get_all = tsh_status_dialog_get_show_unmodified(dialog);
   update = tsh_status_dialog_get_check_reposetory(dialog);
   no_ignore = tsh_status_dialog_get_show_ignore(dialog);
@@ -71,7 +71,7 @@
   subpool = svn_pool_create (pool);
 
   revision.kind = svn_opt_revision_head;
-	if ((err = svn_client_status2(NULL, files?files[0]:"", &revision, tsh_status_func2, dialog, recursive, get_all, update, no_ignore, ignore_externals, ctx, subpool)))
+	if ((err = svn_client_status3(NULL, files?files[0]:"", &revision, tsh_status_func2, dialog, depth, get_all, update, no_ignore, ignore_externals, NULL, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-switch.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-switch.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-switch.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -62,7 +62,7 @@
   subpool = svn_pool_create (pool);
 
   revision.kind = svn_opt_revision_head;
-	if ((err = svn_client_switch(NULL, path, url, &revision, TRUE, ctx, subpool)))
+	if ((err = svn_client_switch2(NULL, path, url, &revision, &revision, svn_depth_infinity, FALSE, FALSE, FALSE, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 
@@ -88,26 +88,21 @@
 	return GINT_TO_POINTER (TRUE);
 }
 
-static svn_error_t* info_callback(void *baton, const char *path, const svn_info_t *info, apr_pool_t *pool)
-{
-  (*((gchar**)baton)) = g_strdup(info->URL);
-  return NULL;
-}
-
 GThread *tsh_switch (gchar **files, svn_client_ctx_t *ctx, apr_pool_t *pool)
 {
 	GtkWidget *dialog;
 	struct thread_args *args;
+  const char *url = NULL;
   gchar *repository = NULL;
   gchar *path;
 	apr_pool_t *subpool;
-	svn_opt_revision_t revision = {svn_opt_revision_unspecified};
 
   path = files?files[0]:NULL;
 
   subpool = svn_pool_create(pool);
 
-  svn_error_clear(svn_client_info(path?path:"", &revision, &revision, info_callback, &repository, FALSE, ctx, subpool));
+  svn_error_clear(svn_client_url_from_path(&url, path?path:"", subpool));
+  repository = g_strdup(url);
 
   svn_pool_destroy(subpool);
 

Modified: thunar-svn-plugin/trunk/tsp-svn-helper/tsh-update.c
===================================================================
--- thunar-svn-plugin/trunk/tsp-svn-helper/tsh-update.c	2009-03-09 12:22:36 UTC (rev 6873)
+++ thunar-svn-plugin/trunk/tsp-svn-helper/tsh-update.c	2009-03-09 19:20:23 UTC (rev 6874)
@@ -79,7 +79,7 @@
 	}
 
   revision.kind = svn_opt_revision_head;
-	if ((err = svn_client_update2(NULL, paths, &revision, TRUE, FALSE, ctx, subpool)))
+	if ((err = svn_client_update3(NULL, paths, &revision, svn_depth_unknown, FALSE, FALSE, FALSE, ctx, subpool)))
 	{
     svn_pool_destroy (subpool);
 




More information about the Goodies-commits mailing list