SF.net SVN: geany-plugins:[445] trunk/geanyvc/vc_bzr.c

yurand at users.sourceforge.net yurand at xxxxx
Thu Feb 5 19:14:16 UTC 2009


Revision: 445
          http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=445&view=rev
Author:   yurand
Date:     2009-02-05 19:14:15 +0000 (Thu, 05 Feb 2009)

Log Message:
-----------
GeanyVC: implemented revert dir/basedir for Bazaar

Modified Paths:
--------------
    trunk/geanyvc/vc_bzr.c

Modified: trunk/geanyvc/vc_bzr.c
===================================================================
--- trunk/geanyvc/vc_bzr.c	2009-02-05 18:33:12 UTC (rev 444)
+++ trunk/geanyvc/vc_bzr.c	2009-02-05 19:14:15 UTC (rev 445)
@@ -37,7 +37,7 @@
 static const gchar *BZR_CMD_DIFF_FILE[] = { "bzr", "diff", BASENAME, NULL };
 static const gchar *BZR_CMD_DIFF_DIR[] = { "bzr", "diff", ABS_DIRNAME, NULL };
 static const gchar *BZR_CMD_REVERT_FILE[] = { "bzr", "revert", BASENAME, NULL };
-static const gchar *BZR_CMD_REVERT_DIR[] = { "bzr", NULL };
+static const gchar *BZR_CMD_REVERT_DIR[] = { "bzr", "revert", BASE_DIRNAME, NULL };
 static const gchar *BZR_CMD_STATUS[] = { "bzr", "status", NULL };
 static const gchar *BZR_CMD_ADD[] = { "bzr", "add", BASENAME, NULL };
 static const gchar *BZR_CMD_REMOVE[] = { "bzr", "remove", BASENAME, NULL };
@@ -65,7 +65,7 @@
 	 .env = NULL,
 	 .function = NULL},
 	{
-	 .startdir = VC_COMMAND_STARTDIR_FILE,
+	 .startdir = VC_COMMAND_STARTDIR_BASE,
 	 .command = BZR_CMD_REVERT_DIR,
 	 .env = NULL,
 	 .function = NULL},
@@ -127,7 +127,7 @@
 in_vc_bzr(const gchar * filename)
 {
 	gint exit_code;
-	gchar *argv[] = { "bzr", "ls", NULL, NULL };
+	gchar *argv[] = { "bzr", "log", NULL, NULL };
 	gchar *dir;
 	gchar *base_name;
 	gboolean ret = FALSE;
@@ -144,13 +144,13 @@
 	argv[2] = base_name;
 
 	exit_code = execute_custom_command(dir, (const gchar **) argv, NULL, &std_output, NULL,
-					   dir, NULL, NULL);
+					   filename, NULL, NULL);
 
 	if (NZV(std_output))
 	{
 		ret = TRUE;
-		g_free(std_output);
 	}
+	g_free(std_output);
 
 	g_free(base_name);
 	g_free(dir);


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Plugins-Commits mailing list