[GRASS-SVN] r65853 - in grass/trunk: display/d.mon lib/gis raster/r.mapcalc raster/r.proj vector/v.external vector/v.proj
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat Aug 8 03:14:26 PDT 2015
Author: neteler
Date: 2015-08-08 03:14:26 -0700 (Sat, 08 Aug 2015)
New Revision: 65853
Modified:
grass/trunk/display/d.mon/start.c
grass/trunk/lib/gis/parser.c
grass/trunk/raster/r.mapcalc/evaluate.c
grass/trunk/raster/r.proj/main.c
grass/trunk/vector/v.external/main.c
grass/trunk/vector/v.proj/main.c
Log:
Existing map case: improve overwrite user msg
Modified: grass/trunk/display/d.mon/start.c
===================================================================
--- grass/trunk/display/d.mon/start.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/display/d.mon/start.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -41,7 +41,7 @@
}
else {
D_close_driver();
- G_fatal_error(_("option <%s>: <%s> exists."),
+ G_fatal_error(_("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"),
"output", output_name);
}
}
Modified: grass/trunk/lib/gis/parser.c
===================================================================
--- grass/trunk/lib/gis/parser.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/lib/gis/parser.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -1469,14 +1469,18 @@
if (!st->overwrite && !over) {
if (G_verbose() > -1) {
if (G_info_format() != G_INFO_FORMAT_GUI) {
+ fprintf(stderr, _("ERROR: "));
fprintf(stderr,
- _("ERROR: option <%s>: <%s> exists.\n"),
+ _("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"),
opt->key, opt->answers[i]);
+ fprintf(stderr, "\n");
}
else {
+ fprintf(stderr, _("GRASS_INFO_ERROR(%d,1): "));
fprintf(stderr,
- "GRASS_INFO_ERROR(%d,1): option <%s>: <%s> exists.\n",
+ "option <%s>: <%s> exists. To overwrite, use the --overwrite flag",
getpid(), opt->key, opt->answers[i]);
+ fprintf(stderr, "\n");
fprintf(stderr, "GRASS_INFO_END(%d,1)\n",
getpid());
}
Modified: grass/trunk/raster/r.mapcalc/evaluate.c
===================================================================
--- grass/trunk/raster/r.mapcalc/evaluate.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/raster/r.mapcalc/evaluate.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -279,7 +279,7 @@
var = e->data.bind.var;
if (!overwrite_flag && check_output_map(var))
- G_fatal_error(_("output map <%s> exists"), var);
+ G_fatal_error(_("output map <%s> exists. To overwrite, use the --overwrite flag"), var);
}
for (l = ee; l; l = l->next) {
Modified: grass/trunk/raster/r.proj/main.c
===================================================================
--- grass/trunk/raster/r.proj/main.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/raster/r.proj/main.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -242,7 +242,8 @@
if (mapname && !list->answer && !overwrite &&
!print_bounds->answer && !gprint_bounds->answer &&
G_find_raster(mapname, G_mapset()))
- G_fatal_error(_("option <%s>: <%s> exists."), "output", mapname);
+ G_fatal_error(_("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"),
+ "output", mapname);
setname = imapset->answer ? imapset->answer : G_store(G_mapset());
if (strcmp(inlocation->answer, G_location()) == 0 &&
Modified: grass/trunk/vector/v.external/main.c
===================================================================
--- grass/trunk/vector/v.external/main.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/vector/v.external/main.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -136,7 +136,7 @@
G_debug(2, "layer '%s' was found", options.layer->answer);
if (G_find_vector2(output, G_mapset()) && !G_check_overwrite(argc, argv)) {
- G_fatal_error(_("option <%s>: <%s> exists."),
+ G_fatal_error(_("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"),
options.output->key, output);
}
Modified: grass/trunk/vector/v.proj/main.c
===================================================================
--- grass/trunk/vector/v.proj/main.c 2015-08-07 21:24:12 UTC (rev 65852)
+++ grass/trunk/vector/v.proj/main.c 2015-08-08 10:14:26 UTC (rev 65853)
@@ -141,7 +141,7 @@
omap_name = map_name;
if (omap_name && !flag.list->answer && !overwrite &&
G_find_vector2(omap_name, G_mapset()))
- G_fatal_error(_("option <%s>: <%s> exists."), omapopt->key,
+ G_fatal_error(_("option <%s>: <%s> exists. To overwrite, use the --overwrite flag"), omapopt->key,
omap_name);
if (isetopt->answer)
iset_name = isetopt->answer;
More information about the grass-commit
mailing list