anjuta r4568 - in trunk: . plugins/subversion
- From: jrliggett svn gnome org
- To: svn-commits-list gnome org
- Subject: anjuta r4568 - in trunk: . plugins/subversion
- Date: Sun, 11 Jan 2009 01:02:30 +0000 (UTC)
Author: jrliggett
Date: Sun Jan 11 01:02:29 2009
New Revision: 4568
URL: http://svn.gnome.org/viewvc/anjuta?rev=4568&view=rev
Log:
2009-01-10 Carl-Anton Ingmarsson <ca ingmarsson gmail com>
reviewed by: James Liggett <jrliggett cox net>
* plugins/subversion/subversion-diff-dialog.c
(on_subversion_diff_response):
* plugins/subversion/subversion-log-dialog.c
(on_log_diff_selected_button_clicked),
(on_log_diff_previous_button_clicked):
* plugins/subversion/subversion-vcs-interface.c
(subversion_ivcs_diff):
* plugins/subversion/svn-diff-command.c
(svn_diff_command_finalize), (svn_diff_command_run),
(svn_diff_command_new):
* plugins/subversion/svn-diff-command.h:
Fix bug 566924 - Subversion diff should be done from the project's root
directory.
Modified:
trunk/ChangeLog
trunk/plugins/subversion/subversion-diff-dialog.c
trunk/plugins/subversion/subversion-log-dialog.c
trunk/plugins/subversion/subversion-vcs-interface.c
trunk/plugins/subversion/svn-diff-command.c
trunk/plugins/subversion/svn-diff-command.h
Modified: trunk/plugins/subversion/subversion-diff-dialog.c
==============================================================================
--- trunk/plugins/subversion/subversion-diff-dialog.c (original)
+++ trunk/plugins/subversion/subversion-diff-dialog.c Sun Jan 11 01:02:29 2009
@@ -84,6 +84,7 @@
diff_command = svn_diff_command_new ((gchar *) path,
SVN_DIFF_REVISION_NONE,
SVN_DIFF_REVISION_NONE,
+ data->plugin->project_root_dir,
!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (diff_no_recursive_check)));
pulse_timer_id = status_bar_progress_pulse (data->plugin,
Modified: trunk/plugins/subversion/subversion-log-dialog.c
==============================================================================
--- trunk/plugins/subversion/subversion-log-dialog.c (original)
+++ trunk/plugins/subversion/subversion-log-dialog.c Sun Jan 11 01:02:29 2009
@@ -399,6 +399,7 @@
diff_command = svn_diff_command_new (data->path,
revision1,
revision2,
+ data->plugin->project_root_dir,
TRUE);
docman = anjuta_shell_get_interface (ANJUTA_PLUGIN (data->plugin)->shell,
@@ -463,8 +464,11 @@
COL_REVISION, &revision,
-1);
- diff_command = svn_diff_command_new (data->path, SVN_DIFF_REVISION_PREVIOUS,
- revision, TRUE);
+ diff_command = svn_diff_command_new (data->path,
+ SVN_DIFF_REVISION_PREVIOUS,
+ revision,
+ data->plugin->project_root_dir,
+ TRUE);
docman = anjuta_shell_get_interface (ANJUTA_PLUGIN (data->plugin)->shell,
IAnjutaDocumentManager, NULL);
Modified: trunk/plugins/subversion/subversion-vcs-interface.c
==============================================================================
--- trunk/plugins/subversion/subversion-vcs-interface.c (original)
+++ trunk/plugins/subversion/subversion-vcs-interface.c Sun Jan 11 01:02:29 2009
@@ -100,6 +100,7 @@
path = g_file_get_path (file);
diff_command = svn_diff_command_new (path, SVN_DIFF_REVISION_NONE,
SVN_DIFF_REVISION_NONE,
+ ANJUTA_PLUGIN_SUBVERSION (obj)->project_root_dir,
TRUE);
g_free (path);
Modified: trunk/plugins/subversion/svn-diff-command.c
==============================================================================
--- trunk/plugins/subversion/svn-diff-command.c (original)
+++ trunk/plugins/subversion/svn-diff-command.c Sun Jan 11 01:02:29 2009
@@ -31,9 +31,10 @@
{
GQueue *output;
gchar *path;
+ gchar *root_dir;
glong revision1;
glong revision2;
- gboolean recursive;
+ svn_depth_t depth;
};
G_DEFINE_TYPE (SvnDiffCommand, svn_diff_command, SVN_TYPE_COMMAND);
@@ -63,6 +64,7 @@
g_queue_free (self->priv->output);
g_free (self->priv->path);
+ g_free (self->priv->root_dir);
g_free (self->priv);
G_OBJECT_CLASS (svn_diff_command_parent_class)->finalize (object);
@@ -146,18 +148,20 @@
apr_file_mktemp (&diff_file, file_template, 0,
svn_command_get_pool (SVN_COMMAND (command)));
- error = svn_client_diff3 (options,
+ error = svn_client_diff4 (options,
self->priv->path,
&revision1,
self->priv->path,
&revision2,
- self->priv->recursive,
+ self->priv->root_dir,
+ self->priv->depth,
FALSE,
FALSE,
FALSE,
SVN_APR_LOCALE_CHARSET,
diff_file,
NULL,
+ NULL,
svn_command_get_client_context (svn_command),
svn_command_get_pool (svn_command));
@@ -207,18 +211,20 @@
}
SvnDiffCommand *
-svn_diff_command_new (const gchar *path, glong revision1, glong revision2,
- gboolean recursive)
+svn_diff_command_new (const gchar *path, glong revision1, glong revision2,
+ const gchar *root_dir, gboolean recursive)
{
SvnDiffCommand *self;
self = g_object_new (SVN_TYPE_DIFF_COMMAND, NULL);
self->priv->path = svn_command_make_canonical_path (SVN_COMMAND (self),
path);
+ self->priv->root_dir = svn_command_make_canonical_path (SVN_COMMAND (self),
+ root_dir);
self->priv->revision1 = revision1;
self->priv->revision2 = revision2;
- self->priv->recursive = recursive;
-
+ self->priv->depth = recursive ? svn_depth_infinity : svn_depth_empty;
+
return self;
}
Modified: trunk/plugins/subversion/svn-diff-command.h
==============================================================================
--- trunk/plugins/subversion/svn-diff-command.h (original)
+++ trunk/plugins/subversion/svn-diff-command.h Sun Jan 11 01:02:29 2009
@@ -62,7 +62,8 @@
GType svn_diff_command_get_type (void) G_GNUC_CONST;
SvnDiffCommand *svn_diff_command_new (const gchar *path, glong revision1,
- glong revision2, gboolean recursive);
+ glong revision2, const gchar *root_dir,
+ gboolean recursive);
void svn_diff_command_destroy (SvnDiffCommand *self);
GQueue *svn_diff_command_get_output (SvnDiffCommand *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]