[tracker] tracker-sparql: Renamed --path option to --file
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker] tracker-sparql: Renamed --path option to --file
- Date: Tue, 8 Sep 2009 07:45:45 +0000 (UTC)
commit 3b9bd79acf483507ec127dbbb4377b85eb5184b8
Author: Martyn Russell <martyn lanedo com>
Date: Tue Sep 8 07:11:21 2009 +0100
tracker-sparql: Renamed --path option to --file
This in so we can add a --properties (-p) option later and because we
are not pointing to a directory but a filename.
src/tracker-utils/tracker-sparql.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/tracker-utils/tracker-sparql.c b/src/tracker-utils/tracker-sparql.c
index 291a4bb..278b2e3 100644
--- a/src/tracker-utils/tracker-sparql.c
+++ b/src/tracker-utils/tracker-sparql.c
@@ -35,22 +35,22 @@
#include <tracker-store/mingw-compat.h>
#endif /* G_OS_WIN32 */
-static gchar *path;
+static gchar *file;
static gchar *query;
static gboolean update;
static GOptionEntry entries[] = {
- { "path", 'p', 0, G_OPTION_ARG_FILENAME, &path,
- N_("Path to use in query"),
- NULL,
+ { "file", 'f', 0, G_OPTION_ARG_FILENAME, &file,
+ N_("Path to use to run a query or update from file"),
+ N_("FILE"),
},
{ "query", 'q', 0, G_OPTION_ARG_STRING, &query,
N_("SPARQL query"),
- NULL
+ N_("SPARQL"),
},
{ "update", 'u', 0, G_OPTION_ARG_NONE, &update,
N_("SPARQL update extensions"),
- NULL
+ N_("SPARQL"),
},
{ NULL }
};
@@ -95,7 +95,7 @@ main (int argc, char **argv)
g_option_context_add_main_entries (context, entries, NULL);
g_option_context_parse (context, &argc, &argv, NULL);
- if ((!path && !query) || (path && query)) {
+ if ((!file && !query) || (file && query)) {
gchar *help;
g_printerr ("%s\n\n",
@@ -119,15 +119,15 @@ main (int argc, char **argv)
return EXIT_FAILURE;
}
- if (path) {
+ if (file) {
gchar *path_in_utf8;
gsize size;
- path_in_utf8 = g_filename_to_utf8 (path, -1, NULL, NULL, &error);
+ path_in_utf8 = g_filename_to_utf8 (file, -1, NULL, NULL, &error);
if (error) {
g_printerr ("%s:'%s', %s\n",
_("Could not get UTF-8 path from path"),
- path,
+ file,
error->message);
g_error_free (error);
tracker_disconnect (client);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]