Просмотр исходного кода

Rename g.mlist to g.list and update g.remove usage

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@62015 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 10 лет назад
Родитель
Сommit
e1984e83be
100 измененных файлов с 274 добавлено и 327 удалено
  1. 4 4
      gui/wxpython/animation/g.gui.animation.html
  2. 4 4
      gui/wxpython/core/globalvar.py
  3. 6 3
      gui/wxpython/gmodeler/frame.py
  4. 9 9
      gui/wxpython/gmodeler/model.py
  5. 4 4
      gui/wxpython/gui_core/dialogs.py
  6. 1 1
      gui/wxpython/gui_core/gselect.py
  7. 6 2
      gui/wxpython/iclass/frame.py
  8. 5 6
      gui/wxpython/iscatt/iscatt_core.py
  9. 8 5
      gui/wxpython/lmgr/datacatalog.py
  10. 2 1
      gui/wxpython/rlisetup/functions.py
  11. 2 2
      gui/wxpython/rlisetup/sampling_frame.py
  12. 2 2
      gui/wxpython/vnet/vnet_core.py
  13. 4 4
      gui/wxpython/vnet/vnet_data.py
  14. 0 6
      gui/wxpython/xml/toolboxes.xml
  15. 3 3
      lib/gpde/test/test_arrays.c
  16. 1 2
      lib/manage/managelib.dox
  17. 8 8
      lib/python/gunittest/case.py
  18. 2 2
      lib/python/gunittest/testsuite/test_assertions_rast3d.py
  19. 2 1
      lib/python/gunittest/testsuite/test_assertions_vect.py
  20. 3 3
      lib/python/pygrass/functions.py
  21. 3 3
      lib/python/pygrass/modules/grid/grid.py
  22. 9 9
      lib/python/pygrass/modules/shortcuts.py
  23. 1 1
      lib/python/pygrass/vector/testsuite/test_vector3d.py
  24. 10 97
      lib/python/script/core.py
  25. 4 4
      lib/python/script/db.py
  26. 0 2
      lib/python/script/pythonlib.dox
  27. 1 1
      lib/python/script/raster.py
  28. 1 1
      lib/python/script/raster3d.py
  29. 1 1
      lib/python/temporal/aggregation.py
  30. 6 3
      lib/python/temporal/extract.py
  31. 4 2
      lib/python/temporal/mapcalc.py
  32. 2 2
      lib/python/temporal/register.py
  33. 3 3
      lib/python/temporal/space_time_datasets.py
  34. 2 2
      lib/python/temporal/temporal_raster3d_algebra.py
  35. 2 2
      lib/python/temporal/temporal_raster_algebra.py
  36. 3 3
      lib/python/temporal/temporal_vector_algebra.py
  37. 1 1
      lib/python/temporal/testsuite/test_register_function.py
  38. 3 3
      raster/r.category/test_rcategory_doctest.txt
  39. 3 3
      raster/r.li/r.li.setup/masked_area_selection.sh
  40. 1 1
      raster/r.li/r.li.setup/r.li.setup
  41. 3 3
      raster/r.li/r.li.setup/sample_area_vector.sh
  42. 1 1
      raster/r.li/r.li.setup/square_mouse_selection.sh
  43. 3 3
      raster/r.mapcalc/testsuite/const_map_test.sh
  44. 2 1
      raster/r.mapcalc/testsuite/test_r_mapcalc.py
  45. 1 1
      raster/r.out.mpeg/main.c
  46. 1 1
      raster/r.patch/r.patch.html
  47. 1 1
      raster/r.reclass/r.reclass.html
  48. 1 1
      raster/r.series.accumulate/r.series.accumulate.html
  49. 2 2
      raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh
  50. 5 5
      raster/r.series/r.series.html
  51. 1 1
      raster/r.slope.aspect/testsuite/test_r_slope_aspect.py
  52. 1 1
      raster/r.to.rast3elev/test.r.to.rast3elev.sh
  53. 1 1
      raster/r.viewshed/testsuite/test_r_viewshed.py
  54. 1 1
      raster/r.watershed/front/r.watershed.html
  55. 4 4
      raster/simwe/r.sim.water/spearfish.sh
  56. 1 1
      raster3d/r3.cross.rast/test.r3.cross.rast.sh
  57. 2 2
      raster3d/r3.flow/testsuite/r3flow_test.py
  58. 2 1
      raster3d/r3.gradient/testsuite/r3gradient_test.py
  59. 3 3
      raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh
  60. 1 1
      raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh
  61. 1 1
      raster3d/r3.retile/test.r3.retile.sh
  62. 4 4
      raster3d/r3.to.rast/test.r3.to.rast.sh
  63. 3 3
      scripts/d.rast.edit/d.rast.edit.py
  64. 2 2
      scripts/d.shadedmap/d.shadedmap.py
  65. 1 1
      scripts/db.in.ogr/db.in.ogr.py
  66. 1 1
      scripts/i.in.spotvgt/i.in.spotvgt.py
  67. 10 5
      scripts/i.pansharpen/i.pansharpen.py
  68. 1 1
      scripts/i.spectral/i.spectral.html
  69. 2 2
      scripts/r.buffer.lowmem/r.buffer.lowmem.py
  70. 2 1
      scripts/r.colors.stddev/r.colors.stddev.py
  71. 5 5
      scripts/r.fillnulls/r.fillnulls.py
  72. 2 1
      scripts/r.grow/r.grow.py
  73. 3 2
      scripts/r.in.wms/wms_base.py
  74. 8 4
      scripts/r.mask/r.mask.py
  75. 1 1
      scripts/r.reclass.area/r.reclass.area.py
  76. 3 3
      scripts/r.unpack/test_suite/test.r.unpack.sh
  77. 2 2
      scripts/r3.in.xyz/r3.in.xyz.py
  78. 1 1
      scripts/v.dissolve/v.dissolve.html
  79. 1 1
      scripts/v.dissolve/v.dissolve.py
  80. 4 2
      scripts/v.out.gps/v.out.gps.py
  81. 6 3
      scripts/v.rast.stats/v.rast.stats.py
  82. 18 9
      scripts/v.to.lines/v.to.lines.py
  83. 3 3
      scripts/v.unpack/test_suite/test.v.unpack.sh
  84. 2 1
      scripts/v.unpack/v.unpack.py
  85. 0 1
      temporal/t.list/t.list.html
  86. 1 1
      temporal/t.merge/testsuite/test.t.merge.sh
  87. 1 1
      temporal/t.rast.accdetect/t.rast.accdetect.py
  88. 1 1
      temporal/t.rast.accumulate/t.rast.accumulate.py
  89. 1 1
      temporal/t.rast.gapfill/test.t.rast.gapfill.sh
  90. 1 1
      temporal/t.rast.import/test.t.rast.import.relative.sh
  91. 1 1
      temporal/t.rast.import/test.t.rast.import.sh
  92. 1 1
      temporal/t.rast.import/test.t.rast.import_locations.sh
  93. 0 1
      temporal/t.rast.list/t.rast.list.html
  94. 1 1
      temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh
  95. 1 1
      temporal/t.rast.neighbors/t.rast.neighbors.py
  96. 2 2
      temporal/t.rast.out.vtk/t.rast.out.vtk.py
  97. 1 1
      temporal/t.rast.series/test.t.rast.series.sh
  98. 1 1
      temporal/t.rast.to.rast3/t.rast.to.rast3.py
  99. 2 2
      temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py
  100. 0 0
      temporal/t.rast3d.list/t.rast3d.list.html

+ 4 - 4
gui/wxpython/animation/g.gui.animation.html

@@ -63,15 +63,15 @@ g.gui.animation strds=precipitation_2000_2010
 </pre></div>
 </pre></div>
 
 
 The loading of a series of maps into the Animation Tool can be simplified
 The loading of a series of maps into the Animation Tool can be simplified
-with <em><a href="g.mlist.html">g.mlist<a></em> (back ticks syntax works for Linux and Mac only):
+with <em><a href="g.list.html">g.list<a></em> (back ticks syntax works for Linux and Mac only):
 <div class="code"><pre>
 <div class="code"><pre>
-g.gui.animation rast=`g.mlist type=rast mapset=. separator=comma pattern="precip*"`
+g.gui.animation rast=`g.list type=rast mapset=. separator=comma pattern="precip*"`
 </pre></div>
 </pre></div>
 
 
 Using extended regular expressions, the list of a series of raster maps can be subset by
 Using extended regular expressions, the list of a series of raster maps can be subset by
 e.g., numeric range (here: precipitation for the years 1997-2012):
 e.g., numeric range (here: precipitation for the years 1997-2012):
 <div class="code"><pre>
 <div class="code"><pre>
-g.gui.animation rast=`g.mlist -e type=rast mapset=. separator=comma pattern="precip_total.(199[7-9]|200[0-9]|201[0-2]).sum"`
+g.gui.animation rast=`g.list -e type=rast mapset=. separator=comma pattern="precip_total.(199[7-9]|200[0-9]|201[0-2]).sum"`
 </pre></div>
 </pre></div>
 
 
 
 
@@ -85,7 +85,7 @@ g.gui.animation rast=`g.mlist -e type=rast mapset=. separator=comma pattern="pre
 <p>
 <p>
 <em>
 <em>
   <a href="g.gui.timeline.html">g.gui.timeline</a>,
   <a href="g.gui.timeline.html">g.gui.timeline</a>,
-  <a href="g.mlist.html">g.mlist</a>
+  <a href="g.list.html">g.list</a>
 </em>
 </em>
 
 
 <p>
 <p>

+ 4 - 4
gui/wxpython/core/globalvar.py

@@ -201,11 +201,11 @@ UpdateGRASSAddOnCommands()
 """@Toolbar icon size"""
 """@Toolbar icon size"""
 toolbarSize = (24, 24)
 toolbarSize = (24, 24)
 
 
-"""@Is g.mlist available?"""
-if 'g.mlist' in grassCmd:
-    have_mlist = True
+"""@Is g.list available?"""
+if 'g.list' in grassCmd:
+    have_list = True
 else:
 else:
-    have_mlist = False
+    have_list = False
 
 
 """@Check version of wxPython, use agwStyle for 2.8.11+"""
 """@Check version of wxPython, use agwStyle for 2.8.11+"""
 hasAgw = CheckWxVersion()
 hasAgw = CheckWxVersion()

+ 6 - 3
gui/wxpython/gmodeler/frame.py

@@ -326,11 +326,14 @@ class ModelFrame(wx.Frame):
             dlg.Destroy()
             dlg.Destroy()
             
             
             if rast:
             if rast:
-                self._gconsole.RunCmd(['g.remove', 'rast=%s' %','.join(rast)])
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=rast',
+                                       'pattern=%s' %','.join(rast)])
             if rast3d:
             if rast3d:
-                self._gconsole.RunCmd(['g.remove', 'rast3d=%s' %','.join(rast3d)])
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=rast3d',
+                                       'pattern=%s' %','.join(rast3d)])
             if vect:
             if vect:
-                self._gconsole.RunCmd(['g.remove', 'vect=%s' %','.join(vect)])
+                self._gconsole.RunCmd(['g.remove', '-f', 'type=vect',
+                                       'pattern=%s' %','.join(vect)])
             
             
             self.SetStatusText(_("%d maps deleted from current mapset") % \
             self.SetStatusText(_("%d maps deleted from current mapset") % \
                                  int(len(rast) + len(rast3d) + len(vect)))
                                  int(len(rast) + len(rast3d) + len(vect)))

+ 9 - 9
gui/wxpython/gmodeler/model.py

@@ -709,11 +709,11 @@ class Model(object):
         rast, vect, rast3d, msg = self.GetIntermediateData()
         rast, vect, rast3d, msg = self.GetIntermediateData()
         
         
         if rast:
         if rast:
-            log.RunCmd(['g.remove', 'rast=%s' %','.join(rast)])
+            log.RunCmd(['g.remove', '-f', 'type=rast', 'pattern=%s' %','.join(rast)])
         if rast3d:
         if rast3d:
-            log.RunCmd(['g.remove', 'rast3d=%s' %','.join(rast3d)])
+            log.RunCmd(['g.remove', '-f', 'type=rast3d', 'pattern=%s' %','.join(rast3d)])
         if vect:
         if vect:
-            log.RunCmd(['g.remove', 'vect=%s' %','.join(vect)])
+            log.RunCmd(['g.remove', '-f', 'type=vect', 'pattern=%s' %','.join(vect)])
         
         
     def GetIntermediateData(self):
     def GetIntermediateData(self):
         """Get info about intermediate data"""
         """Get info about intermediate data"""
@@ -2338,18 +2338,18 @@ def cleanup():
 """)
 """)
         if rast:
         if rast:
             self.fd.write(
             self.fd.write(
-r"""  run_command('g.remove',
-                      rast=%s)
+r"""  run_command('g.remove', flags='f', type='rast',
+                      pattern=%s)
 """% ','.join(map(lambda x: "'" + x + "'", rast)))
 """% ','.join(map(lambda x: "'" + x + "'", rast)))
         if vect:
         if vect:
             self.fd.write(
             self.fd.write(
-r"""  run_command('g.remove',
-                      vect = %s)
+r"""  run_command('g.remove', flags='f', type='vect',
+                      pattern=%s)
 """% ','.join(map(lambda x: "'" + x + "'", vect)))
 """% ','.join(map(lambda x: "'" + x + "'", vect)))
         if rast3d:
         if rast3d:
             self.fd.write(
             self.fd.write(
-r"""  run_command('g.remove',
-                      rast3d = %s)
+r"""  run_command('g.remove', flags='f', type='rast3d',
+                      pattern=%s)
 """% ','.join(map(lambda x: "'" + x + "'", rast3d)))
 """% ','.join(map(lambda x: "'" + x + "'", rast3d)))
         if not rast and not vect and not rast3d:
         if not rast and not vect and not rast3d:
             self.fd.write('    pass\n')
             self.fd.write('    pass\n')

+ 4 - 4
gui/wxpython/gui_core/dialogs.py

@@ -1513,7 +1513,7 @@ class MapLayersDialogBase(wx.Dialog):
     def GetLayerType(self, cmd = False):
     def GetLayerType(self, cmd = False):
         """Get selected layer type
         """Get selected layer type
 
 
-        :param bool cmd: True for g.mlist
+        :param bool cmd: True for g.list
         """
         """
         if not cmd:
         if not cmd:
             return self.layerType.GetStringSelection()
             return self.layerType.GetStringSelection()
@@ -1575,7 +1575,7 @@ class MapLayersDialogForModeler(MapLayersDialogBase):
 
 
     def _modelerDSeries(self):
     def _modelerDSeries(self):
         self.dseries = wx.CheckBox(parent = self, id = wx.ID_ANY,
         self.dseries = wx.CheckBox(parent = self, id = wx.ID_ANY,
-                                   label = _("Dynamic series (%s)") % 'g.mlist')
+                                   label = _("Dynamic series (%s)") % 'g.list')
         self.dseries.SetValue(False)
         self.dseries.SetValue(False)
         self.mainSizer.Add(item = self.dseries, proportion = 0,
         self.mainSizer.Add(item = self.dseries, proportion = 0,
                            flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 5)
                            flag = wx.EXPAND | wx.LEFT | wx.RIGHT, border = 5)
@@ -1583,12 +1583,12 @@ class MapLayersDialogForModeler(MapLayersDialogBase):
     def GetDSeries(self):
     def GetDSeries(self):
         """Used by modeler only
         """Used by modeler only
 
 
-        :return: g.mlist command
+        :return: g.list command
         """
         """
         if not self.dseries or not self.dseries.IsChecked():
         if not self.dseries or not self.dseries.IsChecked():
             return ''
             return ''
         
         
-        cond = 'map in `g.mlist type=%s ' % self.GetLayerType(cmd = True)
+        cond = 'map in `g.list type=%s ' % self.GetLayerType(cmd = True)
         patt = self.filter.GetValue()
         patt = self.filter.GetValue()
         if patt:
         if patt:
             cond += 'pattern=%s ' % patt
             cond += 'pattern=%s ' % patt

+ 1 - 1
gui/wxpython/gui_core/gselect.py

@@ -407,7 +407,7 @@ class TreeCtrlComboPopup(ListCtrlComboPopup):
         # get current mapset
         # get current mapset
         curr_mapset = grass.gisenv()['MAPSET']
         curr_mapset = grass.gisenv()['MAPSET']
 
 
-        # map element types to g.mlist types
+        # map element types to g.list types
         elementdict = {'cell':'rast',
         elementdict = {'cell':'rast',
                        'raster':'rast',
                        'raster':'rast',
                        'rast':'rast',
                        'rast':'rast',

+ 6 - 2
gui/wxpython/iclass/frame.py

@@ -254,7 +254,9 @@ class IClassMapFrame(DoubleMapFrame):
         """Removes temporary vector map with training areas"""
         """Removes temporary vector map with training areas"""
         ret = RunCommand(prog = 'g.remove',
         ret = RunCommand(prog = 'g.remove',
                          parent = self,
                          parent = self,
-                         vect = self.trainingAreaVector)
+                         flags = 'f',
+                         type = 'vect',
+                         pattern = self.trainingAreaVector)
         if ret != 0:
         if ret != 0:
             return False
             return False
         return True
         return True
@@ -265,7 +267,9 @@ class IClassMapFrame(DoubleMapFrame):
         self.GetSecondMap().Clean()
         self.GetSecondMap().Clean()
         ret = RunCommand(prog = 'g.remove',
         ret = RunCommand(prog = 'g.remove',
                          parent = self,
                          parent = self,
-                         rast = raster)
+                         flags = 'f',
+                         type = 'rast',
+                         pattern = raster)
         if ret != 0:
         if ret != 0:
             return False
             return False
         return True
         return True

+ 5 - 6
gui/wxpython/iscatt/iscatt_core.py

@@ -284,8 +284,7 @@ class CatRastUpdater:
             ret = UpdateCatRast(patch_rast, region, self.scatts_dt.GetCatRastCond(cat))
             ret = UpdateCatRast(patch_rast, region, self.scatts_dt.GetCatRastCond(cat))
             if ret < 0:
             if ret < 0:
                 GException(_("Patching category raster conditions file failed."))            
                 GException(_("Patching category raster conditions file failed."))            
-            RunCommand("g.remove",
-                      rast = patch_rast)
+            RunCommand("g.remove", flags='f', type='rast', pattern=patch_rast)
 
 
     def _rasterize(self, grass_region, layer, cat, out_rast):
     def _rasterize(self, grass_region, layer, cat, out_rast):
 
 
@@ -598,8 +597,8 @@ class ScattPlotsData(ScattPlotsCondsData):
         grass.try_remove(self.cats_rasts_conds[cat_id])
         grass.try_remove(self.cats_rasts_conds[cat_id])
         del self.cats_rasts_conds[cat_id]
         del self.cats_rasts_conds[cat_id]
 
 
-        RunCommand("g.remove",
-                   rast=self.cats_rasts[cat_id])
+        RunCommand("g.remove", flags='f', type='rast',
+                   pattern=self.cats_rasts[cat_id])
         del self.cats_rasts[cat_id]
         del self.cats_rasts[cat_id]
 
 
         return True
         return True
@@ -709,8 +708,8 @@ class ScattPlotsData(ScattPlotsCondsData):
         for tmp in self.cats_rasts_conds.itervalues():
         for tmp in self.cats_rasts_conds.itervalues():
             grass.try_remove(tmp) 
             grass.try_remove(tmp) 
         for tmp in self.cats_rasts.itervalues():
         for tmp in self.cats_rasts.itervalues():
-            RunCommand("g.remove",
-                       rast=tmp,
+            RunCommand("g.remove", flags='f',
+                       type='rast', pattern=tmp,
                        getErrorMsg=True)
                        getErrorMsg=True)
 
 
         self.cats_rasts = {}
         self.cats_rasts = {}

+ 8 - 5
gui/wxpython/lmgr/datacatalog.py

@@ -116,7 +116,7 @@ class LocationMapTree(wx.TreeCtrl):
                 self.ChangeEnvironment(location)
                 self.ChangeEnvironment(location)
             varloc = self.AppendItem(self.root, loc)
             varloc = self.AppendItem(self.root, loc)
             #get list of all maps in location
             #get list of all maps in location
-            maplist = RunCommand('g.mlist', flags='mt', type='rast,rast3d,vect', mapset=','.join(mapsets),
+            maplist = RunCommand('g.list', flags='mt', type='rast,rast3d,vect', mapset=','.join(mapsets),
                                  quiet=True, read=True)
                                  quiet=True, read=True)
             maplist = maplist.splitlines()
             maplist = maplist.splitlines()
             for ml in maplist:
             for ml in maplist:
@@ -414,15 +414,18 @@ class DataCatalogTree(LocationMapTree):
                 label = _("Deleting") + " " + string + " ..."
                 label = _("Deleting") + " " + string + " ..."
                 self.showNotification.emit(message=label)
                 self.showNotification.emit(message=label)
                 if (self.GetItemText(self.selected_type)=='vect'):
                 if (self.GetItemText(self.selected_type)=='vect'):
-                    removed = RunCommand('g.remove', vect=string)
+                    removed = RunCommand('g.remove', flags='f', type='vect',
+                                         pattern=string)
                 elif (self.GetItemText(self.selected_type)=='rast'):
                 elif (self.GetItemText(self.selected_type)=='rast'):
-                    removed = RunCommand('g.remove', rast=string)
+                    removed = RunCommand('g.remove', flags='f', type='rast',
+                                         pattern=string)
                 else:
                 else:
-                    removed = RunCommand('g.remove', rast3d=string)
+                    removed = RunCommand('g.remove', flags='f', type='rast3d',
+                                         pattern=string)
                 if (removed==0):
                 if (removed==0):
                     self.Delete(self.selected_layer)
                     self.Delete(self.selected_layer)
                     Debug.msg(1,"LAYER "+string+" DELETED")
                     Debug.msg(1,"LAYER "+string+" DELETED")
-                    label = "g.remove "+self.GetItemText(self.selected_type)+"="+string+"    -- completed" # generate this message (command) automatically?
+                    label = "g.remove -f type="+self.GetItemText(self.selected_type)+" pattern="+string+"    -- completed" # generate this message (command) automatically?
                     self.showNotification.emit(message=label)
                     self.showNotification.emit(message=label)
             self.RestoreBackup()
             self.RestoreBackup()
             
             

+ 2 - 1
gui/wxpython/rlisetup/functions.py

@@ -85,7 +85,8 @@ def convertFeature(vect, outrast, cat, origrast):
     grass.run_command('g.region', vect=tmp_vect, align=origrast)
     grass.run_command('g.region', vect=tmp_vect, align=origrast)
     grass.run_command('v.to.rast', input=vect, output=outrast, use='cat',
     grass.run_command('v.to.rast', input=vect, output=outrast, use='cat',
                       cats=cat, overwrite=True, quiet=True)
                       cats=cat, overwrite=True, quiet=True)
-    grass.run_command('g.remove', vect=tmp_vect, quiet=True)
+    grass.run_command('g.remove', flags='f', type='vect',
+                      pattern=tmp_vect, quiet=True)
 
 
 
 
 def obtainAreaVector(outrast):
 def obtainAreaVector(outrast):

+ 2 - 2
gui/wxpython/rlisetup/sampling_frame.py

@@ -263,8 +263,8 @@ class RLiSetupMapPanel(wx.Panel):
 
 
         marea = MaskedArea(region, rasterName)
         marea = MaskedArea(region, rasterName)
 
 
-        RunCommand('g.remove', rast=tmpraster)
-        RunCommand('g.remove', vect=tmpvector)
+        RunCommand('g.remove', flags='f', type='rast', pattern=tmpraster)
+        RunCommand('g.remove', flags='f', type='vect', pattern=tmpvector)
 
 
         os.unlink(polyfile.name)
         os.unlink(polyfile.name)
         return marea
         return marea

+ 2 - 2
gui/wxpython/vnet/vnet_core.py

@@ -121,8 +121,8 @@ class VNETManager:
 
 
         # for case there is some map with same name 
         # for case there is some map with same name 
         # (when analysis does not produce any map, this map would have been shown as result) 
         # (when analysis does not produce any map, this map would have been shown as result) 
-        RunCommand('g.remove', 
-                    vect = self.results["vect_map"].GetVectMapName())
+        RunCommand('g.remove', flags = 'f', type = 'vect',
+                    pattern = self.results["vect_map"].GetVectMapName())
 
 
         # save data from 
         # save data from 
         self.history._saveAnInputToHist(analysis, params, flags)
         self.history._saveAnInputToHist(analysis, params, flags)

+ 4 - 4
gui/wxpython/vnet/vnet_data.py

@@ -938,8 +938,8 @@ class VNETTmpVectMaps:
         """
         """
         if vectMap:
         if vectMap:
             vectMap.DeleteRenderLayer()
             vectMap.DeleteRenderLayer()
-            RunCommand('g.remove', 
-                        vect = vectMap.GetVectMapName())
+            RunCommand('g.remove', flags = 'f', type = 'vect',
+                        pattern = vectMap.GetVectMapName())
             self.RemoveFromTmpMaps(vectMap)
             self.RemoveFromTmpMaps(vectMap)
             return True
             return True
         return False
         return False
@@ -948,8 +948,8 @@ class VNETTmpVectMaps:
         """Delete all temporary maps in the class"""
         """Delete all temporary maps in the class"""
         update = False
         update = False
         for tmpMap in self.tmpMaps:
         for tmpMap in self.tmpMaps:
-            RunCommand('g.remove', 
-                        vect = tmpMap.GetVectMapName())
+            RunCommand('g.remove', flags = 'f', type = 'vect',
+                        pattern = tmpMap.GetVectMapName())
             if tmpMap.DeleteRenderLayer():
             if tmpMap.DeleteRenderLayer():
                 update = True
                 update = True
         return update
         return update

+ 0 - 6
gui/wxpython/xml/toolboxes.xml

@@ -518,9 +518,6 @@
       <module-item name="g.list">
       <module-item name="g.list">
         <label>List</label>
         <label>List</label>
       </module-item>
       </module-item>
-      <module-item name="g.mlist">
-        <label>List filtered</label>
-      </module-item>
       <separator/>
       <separator/>
       <module-item name="g.rename">
       <module-item name="g.rename">
         <label>Rename</label>
         <label>Rename</label>
@@ -529,9 +526,6 @@
       <module-item name="g.remove">
       <module-item name="g.remove">
         <label>Delete</label>
         <label>Delete</label>
       </module-item>
       </module-item>
-      <module-item name="g.mremove">
-        <label>Delete filtered</label>
-      </module-item>
     </items>
     </items>
   </toolbox>
   </toolbox>
   <toolbox name="MapTypeConversions">
   <toolbox name="MapTypeConversions">

+ 3 - 3
lib/gpde/test/test_arrays.c

@@ -294,7 +294,7 @@ int io_bench_2d(void)
 
 
 
 
     sprintf(buff,
     sprintf(buff,
-	    "g.remove rast=gpde_lib_test_raster_1,gpde_lib_test_raster_2,gpde_lib_test_raster_3");
+	    "g.remove -f type=rast pattern=gpde_lib_test_raster_1,gpde_lib_test_raster_2,gpde_lib_test_raster_3");
     system(buff);
     system(buff);
 
 
     N_free_array_2d(data1);
     N_free_array_2d(data1);
@@ -588,7 +588,7 @@ int test_array_2d(void)
 
 
 
 
     sprintf(buff,
     sprintf(buff,
-	    "g.remove rast=gpde_lib_test_raster_1,gpde_lib_test_raster_2,gpde_lib_test_raster_3");
+	    "g.remove -f type=rast pattern=gpde_lib_test_raster_1,gpde_lib_test_raster_2,gpde_lib_test_raster_3");
     system(buff);
     system(buff);
 
 
 
 
@@ -857,7 +857,7 @@ int test_array_3d(void)
     N_free_array_3d(tmp);
     N_free_array_3d(tmp);
 
 
     sprintf(buff,
     sprintf(buff,
-	    "g.remove rast3d=gpde_lib_test_volume_1,gpde_lib_test_volume_2");
+	    "g.remove -f type=rast3d pattern=gpde_lib_test_volume_1,gpde_lib_test_volume_2");
     system(buff);
     system(buff);
 
 
     N_free_array_3d(data1);
     N_free_array_3d(data1);

+ 1 - 2
lib/manage/managelib.dox

@@ -5,8 +5,7 @@ by GRASS Development Team (http://grass.osgeo.org)
 \section manageintro Introduction
 \section manageintro Introduction
 
 
 This library used for management of data base elements. See modules
 This library used for management of data base elements. See modules
-<tt>g.list, g.mlist, g.remove, g.mremove, g.copy</tt> or
-<tt>g.rename</tt>.
+<tt>g.list, g.remove, g.copy</tt> or <tt>g.rename</tt>.
 
 
 \code
 \code
 #include <grass/manage.h>
 #include <grass/manage.h>

+ 8 - 8
lib/python/gunittest/case.py

@@ -125,7 +125,7 @@ class TestCase(unittest.TestCase):
                                "does not corresond to currently set"
                                "does not corresond to currently set"
                                " WIND_OVERRIDE ({c})",
                                " WIND_OVERRIDE ({c})",
                                n=cls._temp_region, c=name)
                                n=cls._temp_region, c=name)
-        call_module("g.remove", quiet=True, region=name)
+        call_module("g.remove", quiet=True, flags='f', type='region', pattern=name)
         # TODO: we don't know if user calls this
         # TODO: we don't know if user calls this
         # so perhaps some decorator which would use with statemet
         # so perhaps some decorator which would use with statemet
         # but we have zero chance of infuencing another test class
         # but we have zero chance of infuencing another test class
@@ -628,7 +628,7 @@ class TestCase(unittest.TestCase):
                                           sep='=', precision=precision,
                                           sep='=', precision=precision,
                                           reference=statistics, msg=msg)
                                           reference=statistics, msg=msg)
             finally:
             finally:
-                call_module('g.remove', rast=diff)
+                call_module('g.remove', flags='f', type='rast', pattern=diff)
         else:
         else:
             # general case
             # general case
             # TODO: we are using r.info min max and r.univar min max interchangably
             # TODO: we are using r.info min max and r.univar min max interchangably
@@ -654,7 +654,7 @@ class TestCase(unittest.TestCase):
             self.assertRasterFitsUnivar(raster=diff, reference=statistics,
             self.assertRasterFitsUnivar(raster=diff, reference=statistics,
                                         precision=precision, msg=msg)
                                         precision=precision, msg=msg)
         finally:
         finally:
-            call_module('g.remove', rast=diff)
+            call_module('g.remove', flags='f', type='rast', pattern=diff)
 
 
     def assertRasters3dNoDifference(self, actual, reference,
     def assertRasters3dNoDifference(self, actual, reference,
                                     precision, statistics=None, msg=None):
                                     precision, statistics=None, msg=None):
@@ -675,7 +675,7 @@ class TestCase(unittest.TestCase):
                                           sep='=', precision=precision,
                                           sep='=', precision=precision,
                                           reference=statistics, msg=msg)
                                           reference=statistics, msg=msg)
             finally:
             finally:
-                call_module('g.remove', rast3d=diff)
+                call_module('g.remove', flags='f', type='rast3d', pattern=diff)
         else:
         else:
             # general case
             # general case
             # TODO: we are using r.info min max and r.univar min max interchangably
             # TODO: we are using r.info min max and r.univar min max interchangably
@@ -701,7 +701,7 @@ class TestCase(unittest.TestCase):
             self.assertRaster3dFitsUnivar(raster=diff, reference=statistics,
             self.assertRaster3dFitsUnivar(raster=diff, reference=statistics,
                                           precision=precision, msg=msg)
                                           precision=precision, msg=msg)
         finally:
         finally:
-            call_module('g.remove', rast3d=diff)
+            call_module('g.remove', flags='f', type='rast3d', pattern=diff)
 
 
     # TODO: this works only in 2D
     # TODO: this works only in 2D
     # TODO: write tests
     # TODO: write tests
@@ -744,7 +744,7 @@ class TestCase(unittest.TestCase):
                                             reference=ref_info,
                                             reference=ref_info,
                                             msg=msg, precision=precision)
                                             msg=msg, precision=precision)
         finally:
         finally:
-            call_module('g.remove', vect=remove)
+            call_module('g.remove', flags='f', type='vect', pattern=remove)
 
 
     # TODO: write tests
     # TODO: write tests
     def assertVectorsNoAreaDifference(self, actual, reference, precision,
     def assertVectorsNoAreaDifference(self, actual, reference, precision,
@@ -777,7 +777,7 @@ class TestCase(unittest.TestCase):
                     va=actual, vr=reference, p=precision, a=total_area)
                     va=actual, vr=reference, p=precision, a=total_area)
                 self.fail(self._formatMessage(msg, stdmsg))
                 self.fail(self._formatMessage(msg, stdmsg))
         finally:
         finally:
-            call_module('g.remove', vect=diff)
+            call_module('g.remove', flags='f', type='vect', pattern=diff)
 
 
     # TODO: here we have to have significant digits which is not consistent
     # TODO: here we have to have significant digits which is not consistent
     # TODO: documentation for all new asserts
     # TODO: documentation for all new asserts
@@ -841,7 +841,7 @@ class TestCase(unittest.TestCase):
             # we rely on fail method to either raise or return (soon)
             # we rely on fail method to either raise or return (soon)
             os.remove(factual)
             os.remove(factual)
             if vreference:
             if vreference:
-                self.runModule('g.remove', vect=vreference)
+                self.runModule('g.remove', flags='f', type='vect', pattern=vreference)
 
 
     # TODO: we expect v.out.ascii to give the same order all the time, is that OK?
     # TODO: we expect v.out.ascii to give the same order all the time, is that OK?
     def assertVectorAsciiEqualsVectorAscii(self, actual, reference,
     def assertVectorAsciiEqualsVectorAscii(self, actual, reference,

+ 2 - 2
lib/python/gunittest/testsuite/test_assertions_rast3d.py

@@ -29,8 +29,8 @@ class TestRaster3dMapAssertions(gunittest.TestCase):
     def tearDownClass(cls):
     def tearDownClass(cls):
         cls.del_temp_region()
         cls.del_temp_region()
         # TODO: input as list does not work, why?
         # TODO: input as list does not work, why?
-        cls.runModule('g.remove',
-                      rast3d=','.join([cls.constant_map, cls.rcd_increasing_map]))
+        cls.runModule('g.remove', flags='f', type='rast3d',
+                      pattern=','.join([cls.constant_map, cls.rcd_increasing_map]))
 
 
     def test_assertRaster3dFitsUnivar(self):
     def test_assertRaster3dFitsUnivar(self):
         reference = dict(n=1000000,
         reference = dict(n=1000000,

+ 2 - 1
lib/python/gunittest/testsuite/test_assertions_vect.py

@@ -138,7 +138,8 @@ class TestVectorGeometryAssertions(gunittest.TestCase):
         # when invoking separately, no need to delete maps since mapset
         # when invoking separately, no need to delete maps since mapset
         # is deleted
         # is deleted
         if cls.maps_to_remove:
         if cls.maps_to_remove:
-            cls.runModule('g.remove', vect=','.join(cls.maps_to_remove))
+            cls.runModule('g.remove', flags='f', type='vect',
+                          pattern=','.join(cls.maps_to_remove))
 
 
     def test_assertVectorEqualsVector_basic(self):
     def test_assertVectorEqualsVector_basic(self):
         """Check completely different maps."""
         """Check completely different maps."""

+ 3 - 3
lib/python/pygrass/functions.py

@@ -94,10 +94,10 @@ def findmaps(type, pattern=None, mapset='', location='', gisdbase=''):
         return find_in_gisdbase(type, pattern, gis)
         return find_in_gisdbase(type, pattern, gis)
 
 
 
 
-def remove(oldname, maptype, **kwargs):
+def remove(oldname, maptype):
     """Remove a map"""
     """Remove a map"""
-    kwargs.update({maptype: '{old}'.format(old=oldname)})
-    grasscore.run_command('g.remove', quiet=True, **kwargs)
+    grasscore.run_command('g.remove', quiet=True, flags='f',
+                          type=maptype, pattern=oldname)
 
 
 
 
 def rename(oldname, newname, maptype, **kwargs):
 def rename(oldname, newname, maptype, **kwargs):

+ 3 - 3
lib/python/pygrass/modules/grid/grid.py

@@ -255,7 +255,7 @@ def copy_rasters(rasters, gisrc_src, gisrc_dst, region=None):
         mpclc(expression="%s=%s" % (name, rast), overwrite=True, env_=env)
         mpclc(expression="%s=%s" % (name, rast), overwrite=True, env_=env)
         file_dst = "%s.pack" % os.path.join(path_dst, name)
         file_dst = "%s.pack" % os.path.join(path_dst, name)
         rpck(input=name, output=file_dst, overwrite=True, env_=env)
         rpck(input=name, output=file_dst, overwrite=True, env_=env)
-        remove(rast=name, env_=env)
+        remove(flags='f', type='rast', pattern=name, env_=env)
         # change gisdbase to dst
         # change gisdbase to dst
         env['GISRC'] = gisrc_dst
         env['GISRC'] = gisrc_dst
         rupck(input=file_dst, output=rast_clean, overwrite=True, env_=env)
         rupck(input=file_dst, output=rast_clean, overwrite=True, env_=env)
@@ -289,7 +289,7 @@ def copy_vectors(vectors, gisrc_src, gisrc_dst):
         name = nam % vect
         name = nam % vect
         file_dst = "%s.pack" % os.path.join(path_dst, name)
         file_dst = "%s.pack" % os.path.join(path_dst, name)
         vpck(input=name, output=file_dst, overwrite=True, env_=env)
         vpck(input=name, output=file_dst, overwrite=True, env_=env)
-        remove(vect=name, env_=env)
+        remove(flags='f', type='vect', pattern=name, env_=env)
         # change gisdbase to dst
         # change gisdbase to dst
         env['GISRC'] = gisrc_dst
         env['GISRC'] = gisrc_dst
         vupck(input=file_dst, output=vect, overwrite=True, env_=env)
         vupck(input=file_dst, output=vect, overwrite=True, env_=env)
@@ -603,4 +603,4 @@ class GridModule(object):
         if self.inlist:
         if self.inlist:
             grm = Module('g.remove')
             grm = Module('g.remove')
             for key in self.inlist:
             for key in self.inlist:
-                grm(rast=self.inlist[key])
+                grm(flags='f', type='rast', pattern=self.inlist[key])

+ 9 - 9
lib/python/pygrass/modules/shortcuts.py

@@ -20,16 +20,16 @@ class MetaModule(object):
     """Example how to use MetaModule
     """Example how to use MetaModule
 
 
        >>> g = MetaModule('g')
        >>> g = MetaModule('g')
-       >>> g_mlist = g.mlist
-       >>> g_mlist.name
-       'g.mlist'
-       >>> g_mlist.required
+       >>> g_list = g.list
+       >>> g_list.name
+       'g.list'
+       >>> g_list.required
        ['type']
        ['type']
-       >>> g_mlist.inputs.type = 'rast'
-       >>> g_mlist.stdout_ = -1
-       >>> g_mlist.run()
-       Module('g.mlist')
-       >>> g_mlist.outputs.stdout                         # doctest: +ELLIPSIS
+       >>> g_list.inputs.type = 'rast'
+       >>> g_list.stdout_ = -1
+       >>> g_list.run()
+       Module('g.list')
+       >>> g_list.outputs.stdout                         # doctest: +ELLIPSIS
        '...basins...soils...'
        '...basins...soils...'
        >>> r = MetaModule('r')
        >>> r = MetaModule('r')
        >>> what = r.what
        >>> what = r.what

+ 1 - 1
lib/python/pygrass/vector/testsuite/test_vector3d.py

@@ -61,7 +61,7 @@ class VectorTopo3DTestCase(TestCase):
         """Remove the generated vector map, if exist"""
         """Remove the generated vector map, if exist"""
         mset = get_mapset_vector(cls.tmpname, mapset='')
         mset = get_mapset_vector(cls.tmpname, mapset='')
         if mset:
         if mset:
-            run_command("g.remove", vect="%s@%s" % (cls.tmpname, mset))
+            run_command("g.remove", flags='f', type='vect', pattern=cls.tmpname)
 
 
 
 
 if __name__ == '__main__':
 if __name__ == '__main__':

+ 10 - 97
lib/python/script/core.py

@@ -1006,7 +1006,7 @@ def del_temp_region():
     """Unsets WIND_OVERRIDE and removes any region named by it."""
     """Unsets WIND_OVERRIDE and removes any region named by it."""
     try:
     try:
         name = os.environ.pop('WIND_OVERRIDE')
         name = os.environ.pop('WIND_OVERRIDE')
-        run_command("g.remove", quiet=True, region=name)
+        run_command("g.remove", flags='f', quiet=True, type='region', pattern=name)
     except:
     except:
         pass
         pass
 
 
@@ -1040,97 +1040,10 @@ def find_file(name, element='cell', mapset=None):
 # interface to g.list
 # interface to g.list
 
 
 
 
-def list_grouped(type, check_search_path=True):
-    """List elements grouped by mapsets.
-
-    Returns the output from running g.list, as a dictionary where the
-    keys are mapset names and the values are lists of maps in that
-    mapset. Example:
-
-    >>> list_grouped('rast')['PERMANENT'] # doctest: +ELLIPSIS
-    ['basins' ... 'landuse']
-
-
-    :param str type: element type (rast, vect, rast3d, region, ...)
-    :param bool check_search_path: True to add mapsets for the search path
-                                   with no found elements
-
-    :return: directory of mapsets/elements
-    """
-    if type == 'raster' or type == 'cell':
-        verbose(_('Element type should be "rast" and not "%s"') % type)
-        type = 'rast'
-    dashes_re = re.compile("^----+$")
-    mapset_re = re.compile("<(.*)>")
-    result = {}
-    if check_search_path:
-        for mapset in mapsets(search_path=True):
-            result[mapset] = []
-
-    mapset = None
-    for line in read_command("g.list", type=type).splitlines():
-        if line == "":
-            continue
-        if dashes_re.match(line):
-            continue
-        m = mapset_re.search(line)
-        if m:
-            mapset = m.group(1)
-            if mapset not in result.keys():
-                result[mapset] = []
-            continue
-        if mapset:
-            result[mapset].extend(line.split())
-
-    return result
-
-
-def _concat(xs):
-    result = []
-    for x in xs:
-        result.extend(x)
-    return result
-
-
-def list_pairs(type):
-    """List of elements as tuples.
-
-    Returns the output from running g.list, as a list of (map, mapset)
-    pairs. Example:
-
-    >>> list_pairs('rast') # doctest: +ELLIPSIS
-    [('basins', 'PERMANENT'),  ... ('landuse', 'PERMANENT')]
-
-    :param str type: element type (rast, vect, rast3d, region, ...)
-
-    :return: list of tuples (map, mapset)
-    """
-    return _concat([[(map, mapset) for map in maps]
-                    for mapset, maps in list_grouped(type).iteritems()])
-
-
-def list_strings(type):
+def list_strings(type, pattern=None, mapset=None, exclude=None, flag=''):
     """List of elements as strings.
     """List of elements as strings.
 
 
     Returns the output from running g.list, as a list of qualified
     Returns the output from running g.list, as a list of qualified
-    names. Example:
-
-    >>> list_strings('rast')  # doctest: +ELLIPSIS
-    [..., 'lakes@PERMANENT', ..., 'slope@PERMANENT', ...
-
-    :param str type: element type
-
-    :return: list of strings ('map@@mapset')
-    """
-    return ["%s@%s" % pair for pair in list_pairs(type)]
-
-# interface to g.mlist
-
-
-def mlist_strings(type, pattern=None, mapset=None, exclude=None, flag=''):
-    """List of elements as strings.
-
-    Returns the output from running g.mlist, as a list of qualified
     names.
     names.
 
 
     :param str type: element type (rast, vect, rast3d, region, ...)
     :param str type: element type (rast, vect, rast3d, region, ...)
@@ -1146,7 +1059,7 @@ def mlist_strings(type, pattern=None, mapset=None, exclude=None, flag=''):
         verbose(_('Element type should be "rast" and not "%s"') % type)
         verbose(_('Element type should be "rast" and not "%s"') % type)
         type = 'rast'
         type = 'rast'
     result = list()
     result = list()
-    for line in read_command("g.mlist",
+    for line in read_command("g.list",
                              quiet=True,
                              quiet=True,
                              flags='m' + flag,
                              flags='m' + flag,
                              type=type,
                              type=type,
@@ -1158,10 +1071,10 @@ def mlist_strings(type, pattern=None, mapset=None, exclude=None, flag=''):
     return result
     return result
 
 
 
 
-def mlist_pairs(type, pattern=None, mapset=None, exclude=None, flag=''):
+def list_pairs(type, pattern=None, mapset=None, exclude=None, flag=''):
     """List of elements as pairs
     """List of elements as pairs
 
 
-    Returns the output from running g.mlist, as a list of
+    Returns the output from running g.list, as a list of
     (name, mapset) pairs
     (name, mapset) pairs
 
 
     :param str type: element type (rast, vect, rast3d, region, ...)
     :param str type: element type (rast, vect, rast3d, region, ...)
@@ -1173,20 +1086,20 @@ def mlist_pairs(type, pattern=None, mapset=None, exclude=None, flag=''):
 
 
     :return: list of elements
     :return: list of elements
     """
     """
-    return [tuple(map.split('@', 1)) for map in mlist_strings(type, pattern,
+    return [tuple(map.split('@', 1)) for map in list_strings(type, pattern,
                                                               mapset, exclude,
                                                               mapset, exclude,
                                                               flag)]
                                                               flag)]
 
 
 
 
-def mlist_grouped(type, pattern=None, check_search_path=True, exclude=None,
+def list_grouped(type, pattern=None, check_search_path=True, exclude=None,
                   flag=''):
                   flag=''):
     """List of elements grouped by mapsets.
     """List of elements grouped by mapsets.
 
 
-    Returns the output from running g.mlist, as a dictionary where the
+    Returns the output from running g.list, as a dictionary where the
     keys are mapset names and the values are lists of maps in that
     keys are mapset names and the values are lists of maps in that
     mapset. Example:
     mapset. Example:
 
 
-    >>> mlist_grouped('vect', pattern='*roads*')['PERMANENT']
+    >>> list_grouped('vect', pattern='*roads*')['PERMANENT']
     ['railroads', 'roadsmajor']
     ['railroads', 'roadsmajor']
 
 
     :param str type: element type (rast, vect, rast3d, region, ...)
     :param str type: element type (rast, vect, rast3d, region, ...)
@@ -1208,7 +1121,7 @@ def mlist_grouped(type, pattern=None, check_search_path=True, exclude=None,
             result[mapset] = []
             result[mapset] = []
 
 
     mapset = None
     mapset = None
-    for line in read_command("g.mlist", quiet=True, flags="m" + flag,
+    for line in read_command("g.list", quiet=True, flags="m" + flag,
                              type=type, pattern=pattern, exclude=exclude).splitlines():
                              type=type, pattern=pattern, exclude=exclude).splitlines():
         try:
         try:
             name, mapset = line.split('@')
             name, mapset = line.split('@')

+ 4 - 4
lib/python/script/db.py

@@ -31,7 +31,7 @@ def db_describe(table, **args):
     0
     0
     >>> db_describe('myfirestations') # doctest: +ELLIPSIS
     >>> db_describe('myfirestations') # doctest: +ELLIPSIS
     {'nrows': 71, 'cols': [['cat', 'INTEGER', '20'], ... 'ncols': 22}
     {'nrows': 71, 'cols': [['cat', 'INTEGER', '20'], ... 'ncols': 22}
-    >>> run_command('g.remove', vect='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vect', pattern='myfirestations')
     0
     0
 
 
     :param str table: table name
     :param str table: table name
@@ -71,7 +71,7 @@ def db_table_exist(table, **args):
     0
     0
     >>> db_table_exist('myfirestations')
     >>> db_table_exist('myfirestations')
     True
     True
-    >>> run_command('g.remove', vect='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vect', pattern='myfirestations')
     0
     0
 
 
     :param str table: table name
     :param str table: table name
@@ -118,7 +118,7 @@ def db_select(sql=None, filename=None, table=None, **args):
 
 
     >>> db_select(table = 'myfirestations') # doctest: +ELLIPSIS
     >>> db_select(table = 'myfirestations') # doctest: +ELLIPSIS
     (('1', '24', 'Morrisville #3', ... 'HS2A', '1.37'))
     (('1', '24', 'Morrisville #3', ... 'HS2A', '1.37'))
-    >>> run_command('g.remove', vect='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vect', pattern='myfirestations')
     0
     0
 
 
     :param str sql: SQL statement to perform (or None)
     :param str sql: SQL statement to perform (or None)
@@ -164,7 +164,7 @@ def db_table_in_vector(table):
     >>> db_table_in_vector('myfirestations')
     >>> db_table_in_vector('myfirestations')
     ['myfirestations@user1']
     ['myfirestations@user1']
     >>> db_table_in_vector('mfirestations')
     >>> db_table_in_vector('mfirestations')
-    >>> run_command('g.remove', vect='myfirestations')
+    >>> run_command('g.remove', flags='f', type='vect', pattern='myfirestations')
     0
     0
 
 
     :param str table: name of table to query
     :param str table: name of table to query

+ 0 - 2
lib/python/script/pythonlib.dox

@@ -157,8 +157,6 @@ Returns the name of a temporary file, created with \gmod{g.tempfile}.
 
 
  - python::script::core::list_strings()
  - python::script::core::list_strings()
 
 
- - python::script::core::mlist_grouped()
-
 <b>Interface to \gmod{g.mapsets}</b>
 <b>Interface to \gmod{g.mapsets}</b>
 
 
  - python::script::core::mapsets()
  - python::script::core::mapsets()

+ 1 - 1
lib/python/script/raster.py

@@ -119,7 +119,7 @@ def mapcalc_start(exp, quiet=False, verbose=False, overwrite=False,
     0
     0
     >>> p2.wait()
     >>> p2.wait()
     1
     1
-    >>> run_command('g.remove', rast=output)
+    >>> run_command('g.remove', flags='f', type='rast', pattern=output)
 
 
     :param str exp: expression
     :param str exp: expression
     :param bool quiet: True to run quietly (<tt>--q</tt>)
     :param bool quiet: True to run quietly (<tt>--q</tt>)

+ 1 - 1
lib/python/script/raster3d.py

@@ -32,7 +32,7 @@ def raster3d_info(map):
     >>> mapcalc3d('volume = row() + col() + depth()')
     >>> mapcalc3d('volume = row() + col() + depth()')
     >>> raster3d_info('volume') # doctest: +ELLIPSIS
     >>> raster3d_info('volume') # doctest: +ELLIPSIS
     {'vertical_units': '"units"', 'tbres': 1.0, ... 'south': 185000.0}
     {'vertical_units': '"units"', 'tbres': 1.0, ... 'south': 185000.0}
-    >>> run_command('g.remove', rast3d='volume')
+    >>> run_command('g.remove', flags='f', type='rast3d', pattern='volume')
     0
     0
 
 
     :param str map: map name
     :param str map: map name

+ 1 - 1
lib/python/temporal/aggregation.py

@@ -174,7 +174,7 @@ def aggregate_raster_maps(inputs, base, start, end, count, method,
     # In case of a null map continue, do not register null maps
     # In case of a null map continue, do not register null maps
     if new_map.metadata.get_min() is None and new_map.metadata.get_max() is None:
     if new_map.metadata.get_min() is None and new_map.metadata.get_max() is None:
         if not register_null:
         if not register_null:
-            gscript.run_command("g.remove", rast=output)
+            gscript.run_command("g.remove", flags='f', type='rast', pattern=output)
             return None
             return None
 
 
     return new_map
     return new_map

+ 6 - 3
lib/python/temporal/extract.py

@@ -237,11 +237,14 @@ def extract_dataset(input, output, type, where, expression, base, nprocs=1,
                     names += ",%s" % (map.get_name())
                     names += ",%s" % (map.get_name())
                 count += 1
                 count += 1
             if type == "raster":
             if type == "raster":
-                gscript.run_command("g.remove", rast=names, quiet=True)
+                gscript.run_command("g.remove", flags='f', type='rast',
+                                    pattern=names, quiet=True)
             elif type == "raster3d":
             elif type == "raster3d":
-                gscript.run_command("g.remove", rast3d=names, quiet=True)
+                gscript.run_command("g.remove", flags='f', type='rast3d',
+                                    pattern=names, quiet=True)
             elif type == "vector":
             elif type == "vector":
-                gscript.run_command("g.remove", vect=names, quiet=True)
+                gscript.run_command("g.remove", flags='f', type='vect',
+                                    pattern=names, quiet=True)
 
 
     dbif.close()
     dbif.close()
 
 

+ 4 - 2
lib/python/temporal/mapcalc.py

@@ -331,9 +331,11 @@ def dataset_mapcalculator(inputs, output, type, expression, base, method,
                     names += ",%s" % (map.get_name())
                     names += ",%s" % (map.get_name())
                 count += 1
                 count += 1
             if type == "raster":
             if type == "raster":
-                gscript.run_command("g.remove", rast=names, quiet=True)
+                gscript.run_command("g.remove", flags='f', type='rast',
+                                    pattern=names, quiet=True)
             elif type == "raster3d":
             elif type == "raster3d":
-                gscript.run_command("g.remove", rast3d=names, quiet=True)
+                gscript.run_command("g.remove", flags='f', type='rast3d',
+                                    pattern=names, quiet=True)
 
 
     dbif.close()
     dbif.close()
 
 

+ 2 - 2
lib/python/temporal/register.py

@@ -481,7 +481,7 @@ def register_map_object_list(type,  map_list, output_stds,
     register_maps_in_space_time_dataset(type, output_stds_id, unit=unit,
     register_maps_in_space_time_dataset(type, output_stds_id, unit=unit,
                                         file=filename, dbif=dbif)
                                         file=filename, dbif=dbif)
 
 
-    g_remove = pymod.Module("g.remove", quiet=True,
+    g_remove = pymod.Module("g.remove", flags='f', quiet=True,
                             run_=False, finish_=True)
                             run_=False, finish_=True)
 
 
     # Remove empty maps
     # Remove empty maps
@@ -490,7 +490,7 @@ def register_map_object_list(type,  map_list, output_stds,
             if  map.is_in_db(dbif):
             if  map.is_in_db(dbif):
                 map.delete(dbif)
                 map.delete(dbif)
             mod = copy.deepcopy(g_remove)
             mod = copy.deepcopy(g_remove)
-            mod(rast=map.get_name())
+            mod(type='rast', pattern=map.get_name())
             mod.run()
             mod.run()
 
 
     if connected:
     if connected:

+ 3 - 3
lib/python/temporal/space_time_datasets.py

@@ -103,7 +103,7 @@ class RasterDataset(AbstractMapDataset):
         >>> rmap.is_time_relative()
         >>> rmap.is_time_relative()
         False
         False
 
 
-        >>> grass.run_command("g.remove", rast=name, quiet=True)
+        >>> grass.run_command("g.remove", flags="f", type="rast", pattern=name, quiet=True)
         0
         0
         >>> grass.del_temp_region()
         >>> grass.del_temp_region()
 
 
@@ -420,7 +420,7 @@ class Raster3DDataset(AbstractMapDataset):
         True
         True
         >>> r3map.is_time_relative()
         >>> r3map.is_time_relative()
         False
         False
-        >>> grass.run_command("g.remove", rast3d=name, quiet=True)
+        >>> grass.run_command("g.remove", flags="f", type="rast3d", pattern=name, quiet=True)
         0
         0
         >>> grass.del_temp_region()
         >>> grass.del_temp_region()
     """
     """
@@ -741,7 +741,7 @@ class VectorDataset(AbstractMapDataset):
         True
         True
         >>> vmap.is_time_relative()
         >>> vmap.is_time_relative()
         False
         False
-        >>> grass.run_command("g.remove", vect=name, quiet=True)
+        >>> grass.run_command("g.remove", flags="f", type="vect", pattern=name, quiet=True)
         0
         0
         >>> grass.del_temp_region()
         >>> grass.del_temp_region()
 
 

+ 2 - 2
lib/python/temporal/temporal_raster3d_algebra.py

@@ -23,7 +23,7 @@ class TemporalRaster3DAlgebraParser(TemporalRasterBaseAlgebraParser):
         TemporalRasterBaseAlgebraParser.__init__(self, pid, run, debug, spatial, nprocs, register_null)
         TemporalRasterBaseAlgebraParser.__init__(self, pid, run, debug, spatial, nprocs, register_null)
 
 
         self.m_mapcalc = pymod.Module('r3.mapcalc')
         self.m_mapcalc = pymod.Module('r3.mapcalc')
-        self.m_mremove = pymod.Module('g.mremove')
+        self.m_remove = pymod.Module('g.remove')
 
 
     def parse(self, expression, basename = None, overwrite=False):
     def parse(self, expression, basename = None, overwrite=False):
         self.lexer = TemporalRasterAlgebraLexer()
         self.lexer = TemporalRasterAlgebraLexer()
@@ -49,7 +49,7 @@ class TemporalRaster3DAlgebraParser(TemporalRasterBaseAlgebraParser):
                 stringlist = ",".join(chunk)
                 stringlist = ",".join(chunk)
 
 
                 if self.run:
                 if self.run:
-                    m = copy.deepcopy(self.m_mremove)
+                    m = copy.deepcopy(self.m_remove)
                     m.inputs["type"].value = "rast3d"
                     m.inputs["type"].value = "rast3d"
                     m.inputs["pattern"].value = stringlist
                     m.inputs["pattern"].value = stringlist
                     m.flags["f"].value = True
                     m.flags["f"].value = True

+ 2 - 2
lib/python/temporal/temporal_raster_algebra.py

@@ -64,7 +64,7 @@ class TemporalRasterAlgebraParser(TemporalRasterBaseAlgebraParser):
         TemporalRasterBaseAlgebraParser.__init__(self, pid, run, debug, spatial, nprocs, register_null)
         TemporalRasterBaseAlgebraParser.__init__(self, pid, run, debug, spatial, nprocs, register_null)
 
 
         self.m_mapcalc = pymod.Module('r.mapcalc', run_=False, finish_=False)
         self.m_mapcalc = pymod.Module('r.mapcalc', run_=False, finish_=False)
-        self.m_mremove = pymod.Module('g.mremove')
+        self.m_remove = pymod.Module('g.remove')
 
 
     def parse(self, expression, basename = None, overwrite=False):
     def parse(self, expression, basename = None, overwrite=False):
         self.lexer = TemporalRasterAlgebraLexer()
         self.lexer = TemporalRasterAlgebraLexer()
@@ -90,7 +90,7 @@ class TemporalRasterAlgebraParser(TemporalRasterBaseAlgebraParser):
                 stringlist = ",".join(chunk)
                 stringlist = ",".join(chunk)
 
 
                 if self.run:
                 if self.run:
-                    m = copy.deepcopy(self.m_mremove)
+                    m = copy.deepcopy(self.m_remove)
                     m.inputs["type"].value = "rast"
                     m.inputs["type"].value = "rast"
                     m.inputs["pattern"].value = stringlist
                     m.inputs["pattern"].value = stringlist
                     m.flags["f"].value = True
                     m.flags["f"].value = True

+ 3 - 3
lib/python/temporal/temporal_vector_algebra.py

@@ -493,7 +493,7 @@ class TemporalVectorAlgebraParser(TemporalAlgebraParser):
         self.m_overlay = pygrass.Module('v.overlay', quiet=True, run_=False)
         self.m_overlay = pygrass.Module('v.overlay', quiet=True, run_=False)
         self.m_rename = pygrass.Module('g.rename', quiet=True, run_=False)
         self.m_rename = pygrass.Module('g.rename', quiet=True, run_=False)
         self.m_patch = pygrass.Module('v.patch', quiet=True, run_=False)
         self.m_patch = pygrass.Module('v.patch', quiet=True, run_=False)
-        self.m_mremove = pygrass.Module('g.mremove', quiet=True, run_=False)
+        self.m_remove = pygrass.Module('g.remove', quiet=True, run_=False)
         self.m_buffer = pygrass.Module('v.buffer', quiet=True, run_=False)
         self.m_buffer = pygrass.Module('v.buffer', quiet=True, run_=False)
 
 
     def parse(self, expression, basename = None, overwrite = False):
     def parse(self, expression, basename = None, overwrite = False):
@@ -520,10 +520,10 @@ class TemporalVectorAlgebraParser(TemporalAlgebraParser):
             for chunk in chunklist:
             for chunk in chunklist:
                 stringlist = ",".join(chunk)
                 stringlist = ",".join(chunk)
                 if self.debug:
                 if self.debug:
-                    print "g.mremove type=vect pattern=%s"%(stringlist)
+                    print "g.remove type=vect pattern=%s"%(stringlist)
 
 
                 if self.run:
                 if self.run:
-                    m = copy.deepcopy(self.m_mremove)
+                    m = copy.deepcopy(self.m_remove)
                     m.inputs["type"].value = "vect"
                     m.inputs["type"].value = "vect"
                     m.inputs["pattern"].value = stringlist
                     m.inputs["pattern"].value = stringlist
                     m.flags["f"].value = True
                     m.flags["f"].value = True

+ 1 - 1
lib/python/temporal/testsuite/test_register_function.py

@@ -52,7 +52,7 @@ class TestRegisterFunctions(grass.gunittest.TestCase):
         """!Remove maps from temporal database
         """!Remove maps from temporal database
         """
         """
         self.runModule("t.unregister", maps="register_map_1,register_map_2", quiet=True)
         self.runModule("t.unregister", maps="register_map_1,register_map_2", quiet=True)
-        self.runModule("g.mremove", type="rast",  pattern="register_map_1,register_map_2", quiet=True)
+        self.runModule("g.remove", flags='f', type="rast", pattern="register_map_1,register_map_2", quiet=True)
         self.strds_abs.delete()
         self.strds_abs.delete()
         self.strds_rel.delete()
         self.strds_rel.delete()
 
 

+ 3 - 3
raster/r.category/test_rcategory_doctest.txt

@@ -231,9 +231,9 @@ This is useful when test is runned in location which is not deleted
 when test finishes. It could test if everything which was expected
 when test finishes. It could test if everything which was expected
 to be created was created if it would check all outputs properly.
 to be created was created if it would check all outputs properly.
 
 
->>> run_command('g.remove', rast='test')
+>>> run_command('g.remove', flags='f', type='rast', pattern='test')
 0
 0
->>> run_command('g.remove', rast='test_14')
+>>> run_command('g.remove', flags='f', type='rast', pattern='test_14')
 0
 0
->>> run_command('g.remove', rast='test_d')
+>>> run_command('g.remove', flags='f', type='rast', pattern='test_d')
 0
 0

+ 3 - 3
raster/r.li/r.li.setup/masked_area_selection.sh

@@ -104,7 +104,7 @@ cleanup()
    eval `g.findfile elem=windows file="tmp_rli_selmsk.$$" | grep '^name='`
    eval `g.findfile elem=windows file="tmp_rli_selmsk.$$" | grep '^name='`
    if [ -n "$name" ] ; then
    if [ -n "$name" ] ; then
       g.region region="tmp_rli_selmsk.$$"
       g.region region="tmp_rli_selmsk.$$"
-      g.remove region="tmp_rli_selmsk.$$" --quiet
+      g.remove -f type=region pattern="tmp_rli_selmsk.$$" --quiet
    fi
    fi
 
 
    rm -f "$TMP" "$TMP".val
    rm -f "$TMP" "$TMP".val
@@ -190,8 +190,8 @@ if [ "$ok" -eq 1 ] ; then
 	    "$GIS_OPT_conf"
 	    "$GIS_OPT_conf"
 
 
     # remove tmp raster and vector
     # remove tmp raster and vector
-    g.remove rast="tmp_rli_mask.$$" --quiet
-    g.remove vect="tmp_rli_mask_v$$" --quiet
+    g.remove -f type=rast pattern="tmp_rli_mask.$$" --quiet
+    g.remove -f type=vect pattern="tmp_rli_mask_v$$" --quiet
 
 
     if [ "$GIS_FLAG_f" -eq 1 ] ; then
     if [ "$GIS_FLAG_f" -eq 1 ] ; then
     	g.region n="$GIS_OPT_north" s="$GIS_OPT_south" \
     	g.region n="$GIS_OPT_north" s="$GIS_OPT_south" \

+ 1 - 1
raster/r.li/r.li.setup/r.li.setup

@@ -33,7 +33,7 @@ cleanup()
    eval `g.findfile elem=windows file="tmp_rlisetup.$$" | grep '^name='`
    eval `g.findfile elem=windows file="tmp_rlisetup.$$" | grep '^name='`
    if [ -n "$name" ] ; then
    if [ -n "$name" ] ; then
       unset WIND_OVERRIDE
       unset WIND_OVERRIDE
-      g.remove region="tmp_rlisetup.$$" --quiet
+      g.remove -f type=region pattern="tmp_rlisetup.$$" --quiet
    fi
    fi
 }
 }
 trap "cleanup" 2 3 15
 trap "cleanup" 2 3 15

+ 3 - 3
raster/r.li/r.li.setup/sample_area_vector.sh

@@ -71,7 +71,7 @@ cleanup()
    eval `g.findfile elem=windows file="tmp_rli_sampvect.$$" | grep '^name='`
    eval `g.findfile elem=windows file="tmp_rli_sampvect.$$" | grep '^name='`
    if [ -n "$name" ] ; then
    if [ -n "$name" ] ; then
       g.region region="tmp_rli_sampvect.$$"
       g.region region="tmp_rli_sampvect.$$"
-      g.remove region="tmp_rli_sampvect.$$" --quiet
+      g.remove -f type=region pattern="tmp_rli_sampvect.$$" --quiet
    fi
    fi
 
 
    rm -f "$TMP"*
    rm -f "$TMP"*
@@ -184,12 +184,12 @@ while read CAT ; do
 	echo "MASKEDOVERLAYAREA $mask_name|$n|$s|$e|$w" >> "$GIS_OPT_conf"
 	echo "MASKEDOVERLAYAREA $mask_name|$n|$s|$e|$w" >> "$GIS_OPT_conf"
 
 
     elif [ "$ok" -eq -1 ] ; then
     elif [ "$ok" -eq -1 ] ; then
-	g.remove vect="$EXTRACT" --quiet
+	g.remove -f type=vect pattern="$EXTRACT" --quiet
 	break
 	break
     fi
     fi
 
 
     #remove temporary vector map created from v.extract
     #remove temporary vector map created from v.extract
-    g.remove vect="$EXTRACT" --quiet
+    g.remove -f type=vect pattern="$EXTRACT" --quiet
 
 
 done < "$TMP.cat"
 done < "$TMP.cat"
 
 

+ 1 - 1
raster/r.li/r.li.setup/square_mouse_selection.sh

@@ -90,7 +90,7 @@ cleanup()
    eval `g.findfile elem=windows file="tmp_rli_sq.$$" | grep '^name='`
    eval `g.findfile elem=windows file="tmp_rli_sq.$$" | grep '^name='`
    if [ -n "$name" ] ; then
    if [ -n "$name" ] ; then
       g.region region="tmp_rli_sq.$$"
       g.region region="tmp_rli_sq.$$"
-      g.remove region="tmp_rli_sq.$$" --quiet
+      g.remove -f type=region pattern="tmp_rli_sq.$$" --quiet
    fi
    fi
 
 
    rm -f "$TMP" "$TMP.var"
    rm -f "$TMP" "$TMP.var"

+ 3 - 3
raster/r.mapcalc/testsuite/const_map_test.sh

@@ -43,7 +43,7 @@ TMPNAME="`echo ${PID}_tmp_testmap | sed 's+\.+_+g'`"
 cleanup()
 cleanup()
 {
 {
  echo "Removing temporary map"
  echo "Removing temporary map"
- g.remove rast=$TMPNAME > /dev/null
+ g.remove -f type=rast pattern=$TMPNAME > /dev/null
 }
 }
 
 
 # check if a MASK is already present:
 # check if a MASK is already present:
@@ -59,11 +59,11 @@ finalcleanup()
 {
 {
  echo "Restoring user region"
  echo "Restoring user region"
  g.region region=$TMPNAME
  g.region region=$TMPNAME
- g.remove region=$TMPNAME > /dev/null
+ g.remove -f type=region pattern=$TMPNAME > /dev/null
  #restore user mask if present:
  #restore user mask if present:
  if test -f $LOCATION/cell/$USERMASK ; then
  if test -f $LOCATION/cell/$USERMASK ; then
   echo "Restoring user MASK"
   echo "Restoring user MASK"
-  g.remove rast=MASK > /dev/null
+  g.remove -f type=rast pattern=MASK > /dev/null
   g.rename $USERMASK,MASK > /dev/null
   g.rename $USERMASK,MASK > /dev/null
  fi
  fi
 }
 }

+ 2 - 1
raster/r.mapcalc/testsuite/test_r_mapcalc.py

@@ -72,7 +72,8 @@ class TestRandFunction(grass.gunittest.TestCase):
     @classmethod
     @classmethod
     def tearDownClass(cls):
     def tearDownClass(cls):
         cls.del_temp_region()
         cls.del_temp_region()
-        cls.runModule('g.remove', rast=','.join(cls.to_remove))
+        cls.runModule('g.remove', flags='f', type='rast',
+                      pattern=','.join(cls.to_remove))
 
 
     def rinfo_contains_number(self, raster, number):
     def rinfo_contains_number(self, raster, number):
         """Test that r.info stdandard output for raster contains a given number
         """Test that r.info stdandard output for raster contains a given number

+ 1 - 1
raster/r.out.mpeg/main.c

@@ -398,7 +398,7 @@ static void mlist(const char *element, const char *wildarg, const char *outfile)
 	sprintf(pattern_arg, "pattern=%s", wildarg);
 	sprintf(pattern_arg, "pattern=%s", wildarg);
 	sprintf(mapset_arg, "mapset=%s", mapset);
 	sprintf(mapset_arg, "mapset=%s", mapset);
 
 
-	G_spawn_ex("g.mlist", "g.mlist",
+	G_spawn_ex("g.list", "g.list",
 		   type_arg, pattern_arg, mapset_arg,
 		   type_arg, pattern_arg, mapset_arg,
 		   SF_REDIRECT_FILE, SF_STDOUT, SF_MODE_APPEND, outfile,
 		   SF_REDIRECT_FILE, SF_STDOUT, SF_MODE_APPEND, outfile,
 		   NULL);
 		   NULL);

+ 1 - 1
raster/r.patch/r.patch.html

@@ -85,7 +85,7 @@ all, and patch them together to create a mosaic. Overlapping maps will be
 used in the order listed.
 used in the order listed.
 
 
 <div class="code"><pre>
 <div class="code"><pre>
-MAPS=`g.mlist type=rast sep=, pat="map_*"`
+MAPS=`g.list type=rast sep=, pat="map_*"`
 g.region rast=$MAPS
 g.region rast=$MAPS
 r.patch in=$MAPS out=mosaic
 r.patch in=$MAPS out=mosaic
 </pre></div>
 </pre></div>

+ 1 - 1
raster/r.reclass/r.reclass.html

@@ -69,7 +69,7 @@ it was based, is later removed. Therefore, attempting to remove a
 raster map layer from which a <em>r.reclass</em> has been derived
 raster map layer from which a <em>r.reclass</em> has been derived
 is only possible if the original map is removed first.
 is only possible if the original map is removed first.
 Alternatively, a <em>r.reclass</em> map can be removed including 
 Alternatively, a <em>r.reclass</em> map can be removed including 
-its base map by using <p><em><a href="g.mremove.html">g.mremove</a></em>'s
+its base map by using <p><em><a href="g.remove.html">g.remove</a></em>'s
 <b>-b</b> flag.
 <b>-b</b> flag.
 
 
 <p>A <em>r.reclass</em> map is not a true raster map layer.
 <p>A <em>r.reclass</em> map is not a true raster map layer.

+ 1 - 1
raster/r.series.accumulate/r.series.accumulate.html

@@ -125,7 +125,7 @@ r.series.accumulate in=MOD11A1.Day,MOD11A1.Night,MYD11A1.Day,MYD11A1.Night out=M
 
 
 <em>
 <em>
 <a href="r.series.html">r.series</a>,
 <a href="r.series.html">r.series</a>,
-<a href="g.mlist.html">g.mlist</a>,
+<a href="g.list.html">g.list</a>,
 <a href="g.region.html">g.region</a>
 <a href="g.region.html">g.region</a>
 </em>
 </em>
 
 

+ 2 - 2
raster/r.series.accumulate/test_suite/test.r.series.accumulate.sh

@@ -51,7 +51,7 @@ r.series.accumulate basemap=basemap input=map_a, \
                     output=test_accu_9 range=6,9 method=mean --verbose
                     output=test_accu_9 range=6,9 method=mean --verbose
 
 
 # Test for correct results
 # Test for correct results
-for map in `g.mlist type=rast pattern=test_accu_*` ; do
+for map in `g.list type=rast pattern=test_accu_*` ; do
     r.out.ascii input=${map} output=${map}.ref dp=2
     r.out.ascii input=${map} output=${map}.ref dp=2
 done
 done
 
 
@@ -62,4 +62,4 @@ done
 CHAR_NUM=`cat out.diff | wc -c`
 CHAR_NUM=`cat out.diff | wc -c`
 
 
 # Return as exit status 0 in case no diffs are found
 # Return as exit status 0 in case no diffs are found
-exit $CHAR_NUM
+exit $CHAR_NUM

+ 5 - 5
raster/r.series/r.series.html

@@ -84,10 +84,10 @@ As separator between the map name and the weight the charachter | must be used.
 Using <em>r.series</em> with wildcards:
 Using <em>r.series</em> with wildcards:
 <br>
 <br>
 <div class="code"><pre>
 <div class="code"><pre>
-r.series input="`g.mlist pattern='insitu_data.*' sep=,`" \
+r.series input="`g.list pattern='insitu_data.*' sep=,`" \
          output=insitu_data.stddev method=stddev
          output=insitu_data.stddev method=stddev
 </pre></div>
 </pre></div>
-<p>Note the <em>g.mlist</em> script also supports regular expressions for
+<p>Note the <em>g.list</em> script also supports regular expressions for
 selecting map names.
 selecting map names.
 <p>Using <em>r.series</em> with NULL raster maps:
 <p>Using <em>r.series</em> with NULL raster maps:
 <br>
 <br>
@@ -131,11 +131,11 @@ Example for counting the number of days above a certain temperature using
 daily average maps ('???' as DOY wildcard):
 daily average maps ('???' as DOY wildcard):
 <div class="code"><pre>
 <div class="code"><pre>
 # Approach for shell based systems
 # Approach for shell based systems
-r.series input=`g.mlist rast pattern="temp_2003_???_avg" sep=,` \
+r.series input=`g.list rast pattern="temp_2003_???_avg" sep=,` \
          output=temp_2003_days_over_25deg range=25.0,100.0 method=count
          output=temp_2003_days_over_25deg range=25.0,100.0 method=count
 
 
 # Approach in two steps (e.g., for Windows systems)
 # Approach in two steps (e.g., for Windows systems)
-g.mlist rast pattern="temp_2003_???_avg" output=mapnames.txt
+g.list rast pattern="temp_2003_???_avg" output=mapnames.txt
 r.series file=mapnames.txt \
 r.series file=mapnames.txt \
          output=temp_2003_days_over_25deg range=25.0,100.0 method=count
          output=temp_2003_days_over_25deg range=25.0,100.0 method=count
 </pre></div>
 </pre></div>
@@ -143,7 +143,7 @@ r.series file=mapnames.txt \
 
 
 <h2>SEE ALSO</h2>
 <h2>SEE ALSO</h2>
 
 
-<em><a href="g.mlist.html">g.mlist</a></em>,
+<em><a href="g.list.html">g.list</a></em>,
 <em><a href="g.region.html">g.region</a></em>
 <em><a href="g.region.html">g.region</a></em>
 
 
 <h2>AUTHOR</h2>
 <h2>AUTHOR</h2>

+ 1 - 1
raster/r.slope.aspect/testsuite/test_r_slope_aspect.py

@@ -68,7 +68,7 @@ class TestSlopeAspectAgainstReference(grass.gunittest.TestCase):
     @classmethod
     @classmethod
     def tearDownClass(cls):
     def tearDownClass(cls):
         cls.del_temp_region()
         cls.del_temp_region()
-        cls.runModule('g.remove', rast=cls.elevation)
+        cls.runModule('g.remove', flags='f', type='rast', pattern=cls.elevation)
 
 
     def test_slope(self):
     def test_slope(self):
         ref_slope = 'reference_slope'
         ref_slope = 'reference_slope'

+ 1 - 1
raster/r.to.rast3elev/test.r.to.rast3elev.sh

@@ -45,4 +45,4 @@ r.to.rast3elev --o -l  input=elev_45_double,elev_25_double,elev_5_double elevati
 # r.to.rast3elev --o -lu input=elev_25_double,elev_5_double elevation=elev_25_double,elev_5_double output=test_elev_volume_double_9
 # r.to.rast3elev --o -lu input=elev_25_double,elev_5_double elevation=elev_25_double,elev_5_double output=test_elev_volume_double_9
 
 
 # Export of the references
 # Export of the references
-# for i in `g.mlist type=rast3d pattern=test_elev_volume_*` ; do r3.out.ascii dp=0 input=$i output=${i}.ref; done
+# for i in `g.list type=rast3d pattern=test_elev_volume_*` ; do r3.out.ascii dp=0 input=$i output=${i}.ref; done

+ 1 - 1
raster/r.viewshed/testsuite/test_r_viewshed.py

@@ -37,7 +37,7 @@ class TestViewshedAgainstReference(grass.gunittest.TestCase):
     @classmethod
     @classmethod
     def tearDownClass(cls):
     def tearDownClass(cls):
         cls.del_temp_region()
         cls.del_temp_region()
-        cls.runModule('g.remove', rast=cls.elevation)
+        cls.runModule('g.remove', flags='f', type='rast', pattern=cls.elevation)
 
 
     def test_viewshed(self):
     def test_viewshed(self):
         ref_viewshed = 'reference_viewshed'
         ref_viewshed = 'reference_viewshed'

+ 1 - 1
raster/r.watershed/front/r.watershed.html

@@ -422,7 +422,7 @@ cut-off value. This only works with SFD, not with MFD.
        abs(rwater.accum), \
        abs(rwater.accum), \
        null() )"
        null() )"
   r.colors -g rwater.course col=bcyr
   r.colors -g rwater.course col=bcyr
-  g.remove MASK
+  g.remove -f type=rast pattern=MASK
 
 
   # <i>Thinning is required before converting raster lines to vector</i>
   # <i>Thinning is required before converting raster lines to vector</i>
   r.thin in=rwater.course out=rwater.course.Thin
   r.thin in=rwater.course out=rwater.course.Thin

+ 4 - 4
raster/simwe/r.sim.water/spearfish.sh

@@ -41,14 +41,14 @@ echo "Export of manning, soil and gradients"
 r.out.vtk elevation=${dem} input=${output}_manin,soils vectormaps=${output}_dx,${output}_dy,${output}_null output=manning_soils_gradient.vtk null=0.0
 r.out.vtk elevation=${dem} input=${output}_manin,soils vectormaps=${output}_dx,${output}_dy,${output}_null output=manning_soils_gradient.vtk null=0.0
 
 
 echo "Build topology and exporting walker vector points for each time step"
 echo "Build topology and exporting walker vector points for each time step"
-for i in `g.mlist vect | grep ${output}` ; do
+for i in `g.list vect | grep ${output}` ; do
 	v.build $i
 	v.build $i
 	echo "v.out.vtk input=$i output=$i.vtk"
 	echo "v.out.vtk input=$i output=$i.vtk"
 	v.out.vtk input=$i output=$i.vtk
 	v.out.vtk input=$i output=$i.vtk
 done
 done
 
 
 echo "Exporting the raster maps for each time step"
 echo "Exporting the raster maps for each time step"
-for i in `g.mlist rast | grep ${output}` ; do
+for i in `g.list rast | grep ${output}` ; do
 	echo "r.out.vtk elevation=${dem} input=$i output=$i.vtk null=0.0"
 	echo "r.out.vtk elevation=${dem} input=$i output=$i.vtk null=0.0"
 	r.out.vtk elevation=${dem} input=$i output=$i.vtk null=0.0
 	r.out.vtk elevation=${dem} input=$i output=$i.vtk null=0.0
 done
 done
@@ -57,5 +57,5 @@ echo "Now open paraview from this command line and load the vtk files as time se
 echo "Step throu the time steps and adjust the color tables"
 echo "Step throu the time steps and adjust the color tables"
 
 
 # cleanup
 # cleanup
-g.remove --q rast=${output}_dx,${output}_dy,${output}_rain,${output}_manin,${output}_infil,${output}_null
-g.remove --q vect=observation_points
+g.remove --q -f type=rast pattern=${output}_dx,${output}_dy,${output}_rain,${output}_manin,${output}_infil,${output}_null
+g.remove --q -f type=vect pattern=observation_points

+ 1 - 1
raster3d/r3.cross.rast/test.r3.cross.rast.sh

@@ -34,7 +34,7 @@ r3.cross.rast --o input=volume_null elevation=elev_NAN output=test_cross_section
 r3.cross.rast --o input=volume_null elevation=elev_cross output=test_cross_section_result
 r3.cross.rast --o input=volume_null elevation=elev_cross output=test_cross_section_result
 
 
 # Export of the text files
 # Export of the text files
-for i in `g.mlist type=rast pattern=test_cross_section_*` ; do 
+for i in `g.list type=rast pattern=test_cross_section_*` ; do 
     r.out.ascii input=$i output=${i}.txt; 
     r.out.ascii input=$i output=${i}.txt; 
 done
 done
 
 

+ 2 - 2
raster3d/r3.flow/testsuite/r3flow_test.py

@@ -54,8 +54,8 @@ class FlowlineTest(TestCase):
     def tearDownClass(cls):
     def tearDownClass(cls):
         """!Remove the temporary region"""
         """!Remove the temporary region"""
         cls.del_temp_region()
         cls.del_temp_region()
-        cls.runModule('g.remove', rast3d=['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum'])
-        cls.runModule('g.remove', vect=['test_flowline', 'test_seeds'])
+        cls.runModule('g.remove', flags='f', type='rast3d', pattern=['map_1', 'map_2', 'map_3', 'map_4', 'map_5', 'test_flowaccum'])
+        cls.runModule('g.remove', flags='f', type='vect', pattern=['test_flowline', 'test_seeds'])
         os.remove('./data/flowline_tmp.ascii')
         os.remove('./data/flowline_tmp.ascii')
 
 
     def test_interpolation(self):
     def test_interpolation(self):

+ 2 - 1
raster3d/r3.gradient/testsuite/r3gradient_test.py

@@ -114,7 +114,8 @@ class GradientTest(TestCase):
     def tearDownClass(cls):
     def tearDownClass(cls):
         """!Remove the temporary region"""
         """!Remove the temporary region"""
         cls.del_temp_region()
         cls.del_temp_region()
-        cls.runModule('g.remove', rast3d=['test_map_1_ref', 'test_map_2_ref', 'test_grad_x',
+        cls.runModule('g.remove', flags='f', type='rast3d',
+                      pattern=['test_map_1_ref', 'test_map_2_ref', 'test_grad_x',
                                           'test_grad_y', 'test_grad_z', 'test_null_grad_x',
                                           'test_grad_y', 'test_grad_z', 'test_null_grad_x',
                                           'test_null_grad_y', 'test_null_grad_z'])
                                           'test_null_grad_y', 'test_null_grad_z'])
 
 

+ 3 - 3
raster3d/r3.in.bin/test_suite/test.r3.in.bin.sh

@@ -124,7 +124,7 @@ r3.in.bin --o output=test_in_bin_float_13 byte=4 null=-9999 \
     bottom=0 top=100 west=0 east=180 south=0 north=90 \
     bottom=0 top=100 west=0 east=180 south=0 north=90 \
     cols=18 rows=9 depths=10
     cols=18 rows=9 depths=10
 
 
-for map in `g.mlist type=rast3d pattern=test_in_bin_float*` ; do
+for map in `g.list type=rast3d pattern=test_in_bin_float*` ; do
   r3.out.ascii input=${map} output=${map}.txt dp=0
   r3.out.ascii input=${map} output=${map}.txt dp=0
 done
 done
 
 
@@ -132,7 +132,7 @@ for i in `ls test_in_bin_float_*.txt` ; do
     diff $i test_out_bin_float.ref
     diff $i test_out_bin_float.ref
 done
 done
 
 
-g.mremove -f rast3d=test_in*
-g.mremove -f rast3d=test_out*
+g.remove -f type=rast3d pattern=test_in*
+g.remove -f type=rast3d pattern=test_out*
 rm test_in_*.txt
 rm test_in_*.txt
 rm test_out_*.bin
 rm test_out_*.bin

+ 1 - 1
raster3d/r3.out.netcdf/test_suite/test.r3.out.netcdf.sh

@@ -31,4 +31,4 @@ r3.out.netcdf --o -p null=-1000 input=volume_time_float output=test_time_float.n
 r3.info volume_time_float
 r3.info volume_time_float
 ncdump -h test_time_float.nc
 ncdump -h test_time_float.nc
 
 
-g.remove rast3=volume_float,volume_double,volume_time_double,volume_time_float
+g.remove -f type=rast3 pattern=volume_float,volume_double,volume_time_double,volume_time_float

+ 1 - 1
raster3d/r3.retile/test.r3.retile.sh

@@ -36,7 +36,7 @@ r3.retile --o input=volume_null output=test_retile_map_10 tiledim=34x46x22 -c
 r3.info -g map=test_retile_map_10 > test_retile_map_10_info.txt
 r3.info -g map=test_retile_map_10 > test_retile_map_10_info.txt
 
 
 # Create the validation files
 # Create the validation files
-for map in `g.mlist type=rast3d pattern=test_retile_map_*` ; do
+for map in `g.list type=rast3d pattern=test_retile_map_*` ; do
   r3.out.ascii input=${map} output=${map}.txt dp=0
   r3.out.ascii input=${map} output=${map}.txt dp=0
 done
 done
 
 

+ 4 - 4
raster3d/r3.to.rast/test.r3.to.rast.sh

@@ -21,8 +21,8 @@ r3.to.rast --o input=volume_null output=test_raster_slice_1
 r3.to.rast --o input=volume_null_float output=test_raster_slice_float
 r3.to.rast --o input=volume_null_float output=test_raster_slice_float
 
 
 # Export of the references
 # Export of the references
-for i in `g.mlist type=rast pattern=test_raster_slice_1*` ; do r.out.ascii input=$i output=${i}.txt; done
-for i in `g.mlist type=rast pattern=test_raster_slice_float*` ; do r.out.ascii input=$i output=${i}.txt; done
+for i in `g.list type=rast pattern=test_raster_slice_1*` ; do r.out.ascii input=$i output=${i}.txt; done
+for i in `g.list type=rast pattern=test_raster_slice_float*` ; do r.out.ascii input=$i output=${i}.txt; done
 
 
 # The next @preprocess step adjusts the raster region to increase the resolution by 2
 # The next @preprocess step adjusts the raster region to increase the resolution by 2
 g.region res=7.5 -p3
 g.region res=7.5 -p3
@@ -32,7 +32,7 @@ g.region res=7.5 -p3
 r3.to.rast --o input=volume_null output=test_raster_slice_2
 r3.to.rast --o input=volume_null output=test_raster_slice_2
 
 
 # Export of the references
 # Export of the references
-for i in `g.mlist type=rast pattern=test_raster_slice_2*` ; do r.out.ascii input=$i output=${i}.txt; done
+for i in `g.list type=rast pattern=test_raster_slice_2*` ; do r.out.ascii input=$i output=${i}.txt; done
 
 
 # The next @preprocess step adjusts the raster region to increase the resolution by 2 again
 # The next @preprocess step adjusts the raster region to increase the resolution by 2 again
 g.region res=5 -p3
 g.region res=5 -p3
@@ -42,7 +42,7 @@ g.region res=5 -p3
 r3.to.rast --o input=volume_null output=test_raster_slice_3
 r3.to.rast --o input=volume_null output=test_raster_slice_3
 
 
 # Export of the references
 # Export of the references
-for i in `g.mlist type=rast pattern=test_raster_slice_3*` ; do r.out.ascii input=$i output=${i}.txt; done
+for i in `g.list type=rast pattern=test_raster_slice_3*` ; do r.out.ascii input=$i output=${i}.txt; done
 
 
 # Comparison of references and text files
 # Comparison of references and text files
 for i in `ls *.ref` ; do 
 for i in `ls *.ref` ; do 

+ 3 - 3
scripts/d.rast.edit/d.rast.edit.py

@@ -495,7 +495,7 @@ class Application(wx.App):
 
 
     def cleanup(self):
     def cleanup(self):
 	grass.try_remove(self.tempfile)
 	grass.try_remove(self.tempfile)
-	run('g.remove', rast = self.tempmap)
+	run('g.remove', flags = 'f', type = 'rast', pattern = self.tempmap)
 
 
     def finalize(self):
     def finalize(self):
 	self.save_map()
 	self.save_map()
@@ -529,7 +529,7 @@ class Application(wx.App):
 	run('g.region', rast = self.inmap)
 	run('g.region', rast = self.inmap)
 	run('r.patch', input = (self.tempmap, self.outmap), output = self.outmap, overwrite = True)
 	run('r.patch', input = (self.tempmap, self.outmap), output = self.outmap, overwrite = True)
 	run('r.colors', map = self.outmap, rast = self.inmap)
 	run('r.colors', map = self.outmap, rast = self.inmap)
-	run('g.remove', rast = self.tempmap)
+	run('g.remove', flags = 'f', type = 'rast', pattern = self.tempmap)
 
 
     def read_header(self, infile):
     def read_header(self, infile):
 	wind = {}
 	wind = {}
@@ -635,7 +635,7 @@ class Application(wx.App):
 	run('r.mapcalc', expression = "%s = %d" % (self.tempmap, val))
 	run('r.mapcalc', expression = "%s = %d" % (self.tempmap, val))
 	run('r.colors', map = self.tempmap, rast = self.inmap)
 	run('r.colors', map = self.tempmap, rast = self.inmap)
 	run('r.out.ppm', input = self.tempmap, out = self.tempfile)
 	run('r.out.ppm', input = self.tempmap, out = self.tempfile)
-	run('g.remove', rast = self.tempmap)
+	run('g.remove', flags = 'f', type = 'rast', pattern = self.tempmap)
 
 
 	tempimg = wx.Image(self.tempfile)
 	tempimg = wx.Image(self.tempfile)
 	grass.try_remove(self.tempfile)
 	grass.try_remove(self.tempfile)

+ 2 - 2
scripts/d.shadedmap/d.shadedmap.py

@@ -60,8 +60,8 @@ def main():
                           r_map = tmp_r, g_map = tmp_g, b_map = tmp_b)
                           r_map = tmp_r, g_map = tmp_g, b_map = tmp_b)
         grass.run_command('r.composite', red = tmp_r, green = tmp_g,
         grass.run_command('r.composite', red = tmp_r, green = tmp_g,
                           blue = tmp_b, output = output_map)
                           blue = tmp_b, output = output_map)
-        grass.run_command('g.remove', quiet = True,
-                          rast = '%s,%s,%s' % (tmp_r, tmp_g, tmp_b))
+        grass.run_command('g.remove', flags = 'f', quiet = True, type='rast',
+                          pattern = '%s,%s,%s' % (tmp_r, tmp_g, tmp_b))
 
 
 
 
     ret = grass.run_command("d.his", h_map = drape_map, i_map = relief_map,
     ret = grass.run_command("d.his", h_map = drape_map, i_map = relief_map,

+ 1 - 1
scripts/db.in.ogr/db.in.ogr.py

@@ -108,7 +108,7 @@ def main():
     else:
     else:
 	# remove the vector part
 	# remove the vector part
 	grass.run_command('v.db.connect', quiet = True, map = output, layer = '1', flags = 'd')
 	grass.run_command('v.db.connect', quiet = True, map = output, layer = '1', flags = 'd')
-	grass.run_command('g.remove', quiet = True, vect = output)
+	grass.run_command('g.remove', flags = 'f', quiet = True, type = 'vect', pattern = output)
 
 
     # get rid of superfluous auto-added cat column (and cat_ if present)
     # get rid of superfluous auto-added cat column (and cat_ if present)
     nuldev = file(os.devnull, 'w+')
     nuldev = file(os.devnull, 'w+')

+ 1 - 1
scripts/i.in.spotvgt/i.in.spotvgt.py

@@ -177,7 +177,7 @@ def main():
     grass.message(_("Remapping digital numbers to NDVI..."))
     grass.message(_("Remapping digital numbers to NDVI..."))
     tmpname = "%s_%s" % (name, pid)
     tmpname = "%s_%s" % (name, pid)
     grass.mapcalc("$tmpname = 0.004 * $name - 0.1", tmpname = tmpname, name = name)
     grass.mapcalc("$tmpname = 0.004 * $name - 0.1", tmpname = tmpname, name = name)
-    grass.run_command('g.remove', rast = name, quiet = True)
+    grass.run_command('g.remove', flags = 'f', type = 'rast', pattern = name, quiet = True)
     grass.run_command('g.rename', rast = (tmpname, name), quiet = True)
     grass.run_command('g.rename', rast = (tmpname, name), quiet = True)
 
 
     # write cmd history:
     # write cmd history:

+ 10 - 5
scripts/i.pansharpen/i.pansharpen.py

@@ -175,7 +175,8 @@ def main():
             
             
 
 
         # Cleanup
         # Cleanup
-        grass.run_command('g.remove', quiet=True, rast='%s,%s,%s' % (panmatch1, panmatch2, panmatch3))
+        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+                          pattern='%s,%s,%s' % (panmatch1, panmatch2, panmatch3))
 
 
     elif sharpen == "ihs":
     elif sharpen == "ihs":
         grass.verbose(_("Using IHS<->RGB algorithm"))
         grass.verbose(_("Using IHS<->RGB algorithm"))
@@ -205,7 +206,8 @@ def main():
                           blue_output="%s_blue" % out)
                           blue_output="%s_blue" % out)
 
 
         # Cleanup
         # Cleanup
-        grass.run_command('g.remove', quiet=True, rast=panmatch)
+        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+                          pattern=panmatch)
         
         
     elif sharpen == "pca":
     elif sharpen == "pca":
         grass.verbose(_("Using PCA/inverse PCA algorithm"))
         grass.verbose(_("Using PCA/inverse PCA algorithm"))
@@ -299,7 +301,8 @@ def main():
 
 
         
         
         # Cleanup
         # Cleanup
-        grass.run_command('g.mremove', flags='f', quiet=True, type="rast", pattern='tmp%s*,%s' % (pid,panmatch))
+        grass.run_command('g.remove', flags='f', quiet=True, type="rast",
+                          pattern='tmp%s*,%s' % (pid,panmatch))
         
         
     #Could add other sharpening algorithms here, e.g. wavelet transformation
     #Could add other sharpening algorithms here, e.g. wavelet transformation
 
 
@@ -335,7 +338,8 @@ def main():
         grass.raster_history("%s_%s" % (out, ch))
         grass.raster_history("%s_%s" % (out, ch))
 
 
     # Cleanup        
     # Cleanup        
-    grass.run_command('g.mremove', flags="f", type="rast", pattern="tmp%s*" % pid, quiet=True)
+    grass.run_command('g.remove', flags="f", type="rast",
+                      pattern="tmp%s*" % pid, quiet=True)
 
 
         
         
 def matchhist(original, target, matched):
 def matchhist(original, target, matched):
@@ -417,7 +421,8 @@ def matchhist(original, target, matched):
     # create reclass of target from reclass rules file
     # create reclass of target from reclass rules file
     result = grass.core.find_file(matched, element = 'cell')
     result = grass.core.find_file(matched, element = 'cell')
     if result['fullname']:
     if result['fullname']:
-        grass.run_command('g.remove', quiet=True, rast=matched)
+        grass.run_command('g.remove', flags='f', quiet=True, type='rast',
+                          pattern=matched)
         grass.run_command('r.reclass', input=original, out=matched, rules=outfile.name)
         grass.run_command('r.reclass', input=original, out=matched, rules=outfile.name)
     else:
     else:
         grass.run_command('r.reclass', input=original, out=matched, rules=outfile.name)
         grass.run_command('r.reclass', input=original, out=matched, rules=outfile.name)

+ 1 - 1
scripts/i.spectral/i.spectral.html

@@ -29,7 +29,7 @@ North Carolina sample dataset:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
 g.region rast=lsat7_2002_10 -p
 g.region rast=lsat7_2002_10 -p
-LIST=`g.mlist type=rast pattern="lsat7_2002_[1-5,7]0" separator=","`
+LIST=`g.list type=rast pattern="lsat7_2002_[1-5,7]0" separator=","`
 i.spectral raster=$LIST coordinates=637502.25,221744.25
 i.spectral raster=$LIST coordinates=637502.25,221744.25
 </pre></div>
 </pre></div>
 
 

+ 2 - 2
scripts/r.buffer.lowmem/r.buffer.lowmem.py

@@ -58,9 +58,9 @@ scales = {
 # what to do in case of user break:
 # what to do in case of user break:
 def cleanup():
 def cleanup():
     if grass.find_file(temp_src)['file']:
     if grass.find_file(temp_src)['file']:
-        grass.run_command('g.remove', quiet = True, flags = 'f', rast = temp_src)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', pattern = temp_src)
     if grass.find_file(temp_dist)['file']:
     if grass.find_file(temp_dist)['file']:
-        grass.run_command('g.remove', quiet = True, flags = 'f', rast = temp_dist)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', pattern = temp_dist)
 
 
 def main():
 def main():
     global temp_dist, temp_src
     global temp_dist, temp_src

+ 2 - 1
scripts/r.colors.stddev/r.colors.stddev.py

@@ -40,7 +40,8 @@ def z(n):
 
 
 def cleanup():
 def cleanup():
     if tmpmap:
     if tmpmap:
-	grass.run_command('g.remove', rast = tmpmap, quiet = True)
+	grass.run_command('g.remove', flags = 'f', type = 'rast',
+                      pattern = tmpmap, quiet = True)
 
 
 def main():
 def main():
     global tmpmap
     global tmpmap

+ 5 - 5
scripts/r.fillnulls/r.fillnulls.py

@@ -100,9 +100,9 @@ mapset = None
 def cleanup():
 def cleanup():
     #delete internal mask and any TMP files:
     #delete internal mask and any TMP files:
     if len(tmp_vmaps) > 0:
     if len(tmp_vmaps) > 0:
-        grass.run_command('g.remove', quiet = True, flags = 'f', vect = tmp_vmaps)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'vect', pattern = tmp_vmaps)
     if len(tmp_rmaps) > 0:
     if len(tmp_rmaps) > 0:
-        grass.run_command('g.remove', quiet = True, flags = 'f', rast = tmp_rmaps)
+        grass.run_command('g.remove', quiet = True, flags = 'fb', type = 'rast', pattern = tmp_rmaps)
     if usermask and mapset:
     if usermask and mapset:
         if grass.find_file(usermask, mapset = mapset)['file']:
         if grass.find_file(usermask, mapset = mapset)['file']:
             grass.run_command('g.rename', quiet = True, rast = (usermask, 'MASK'), overwrite = True)
             grass.run_command('g.rename', quiet = True, rast = (usermask, 'MASK'), overwrite = True)
@@ -233,7 +233,7 @@ def main():
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
             
             
             # remove temporary map to not overfill disk
             # remove temporary map to not overfill disk
-            if grass.run_command('g.remove', flags = 'f', vect = holename + '_pol', quiet = quiet) != 0:
+            if grass.run_command('g.remove', flags = 'fb', type = 'vect', pattern = holename + '_pol', quiet = quiet) != 0:
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
             tmp_vmaps.remove(holename + '_pol')
             tmp_vmaps.remove(holename + '_pol')
             
             
@@ -325,14 +325,14 @@ def main():
                 tmp_rmaps.remove(holename + '_dem')
                 tmp_rmaps.remove(holename + '_dem')
             except:
             except:
                 pass
                 pass
-            if grass.run_command('g.remove', quiet = quiet, flags = 'f', rast = 
+            if grass.run_command('g.remove', quiet = quiet, flags = 'fb', type = 'rast', pattern = 
                 (holename, holename + '_grown', holename + '_edges', holename + '_dem')) != 0:
                 (holename, holename + '_grown', holename + '_edges', holename + '_dem')) != 0:
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
             try:
             try:
                 tmp_vmaps.remove(holename)
                 tmp_vmaps.remove(holename)
             except:
             except:
                 pass
                 pass
-            if grass.run_command('g.remove', quiet = quiet, flags = 'f', vect = holename) != 0:
+            if grass.run_command('g.remove', quiet = quiet, flags = 'fb', type = 'vect', pattern = holename) != 0:
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
                 grass.fatal(_("abandoned. Removing temporary maps, restoring user mask if needed:"))
     
     
     #check if method is different from rst to use r.resamp.bspline
     #check if method is different from rst to use r.resamp.bspline

+ 2 - 1
scripts/r.grow/r.grow.py

@@ -68,7 +68,8 @@ import grass.script as grass
 def cleanup():
 def cleanup():
     for map in [temp_dist, temp_val]:
     for map in [temp_dist, temp_val]:
         if map:
         if map:
-            grass.run_command('g.remove', quiet = True, flags = 'f', rast = map)
+            grass.run_command('g.remove', flags = 'fb', quiet = True,
+                              type='rast', pattern = map)
 
 
 def main():
 def main():
     global temp_dist, temp_val
     global temp_dist, temp_val

+ 3 - 2
scripts/r.in.wms/wms_base.py

@@ -463,8 +463,9 @@ class GRASSImporter:
             if maps:
             if maps:
                 grass.run_command('g.remove',
                 grass.run_command('g.remove',
                                   quiet = True,
                                   quiet = True,
-                                  flags = 'f',
-                                  rast  = ','.join(maps))
+                                  flags = 'fb',
+                                  type = 'rast',
+                                  pattern = ','.join(maps))
         
         
         # delete environmental variable which overrides region 
         # delete environmental variable which overrides region 
         if 'GRASS_REGION' in os.environ.keys():
         if 'GRASS_REGION' in os.environ.keys():

+ 8 - 4
scripts/r.mask/r.mask.py

@@ -73,9 +73,11 @@ import atexit
 
 
 def cleanup():
 def cleanup():
     if tmp:
     if tmp:
-        grass.run_command('g.remove', rast = tmp, quiet = True)
+        grass.run_command('g.remove', flags = 'f', type = 'rast',
+                          pattern = tmp, quiet = True)
     if tmp_hull:
     if tmp_hull:
-        grass.run_command('g.remove', vect = tmp_hull, quiet = True)
+        grass.run_command('g.remove', flags = 'f', type = 'vect',
+                          pattern = tmp_hull, quiet = True)
 
 
 def main():
 def main():
     raster = options['raster']
     raster = options['raster']
@@ -96,7 +98,8 @@ def main():
     if remove:
     if remove:
         # -> remove
         # -> remove
         if exists:
         if exists:
-            grass.run_command('g.remove', quiet = True, rast = 'MASK')
+            grass.run_command('g.remove', flags = 'f', quiet = True,
+                              type = 'rast', pattern = 'MASK')
             grass.message(_("Raster MASK removed"))
             grass.message(_("Raster MASK removed"))
         else:
         else:
             grass.fatal(_("No existing MASK to remove"))
             grass.fatal(_("No existing MASK to remove"))
@@ -107,7 +110,8 @@ def main():
                 grass.fatal(_("MASK already found in current mapset. Delete first or overwrite."))
                 grass.fatal(_("MASK already found in current mapset. Delete first or overwrite."))
             else:
             else:
                 grass.warning(_("MASK already exists and will be overwritten"))
                 grass.warning(_("MASK already exists and will be overwritten"))
-                grass.run_command('g.remove', quiet = True, rast = 'MASK')
+                grass.run_command('g.remove', flags = 'f', quiet = True,
+                                  type = 'rast', pattern = 'MASK')
         
         
         if raster:
         if raster:
             # check if input raster exists
             # check if input raster exists

+ 1 - 1
scripts/r.reclass.area/r.reclass.area.py

@@ -164,7 +164,7 @@ def cleanup():
     """!Delete temporary maps"""
     """!Delete temporary maps"""
     TMPRAST.reverse()  # reclassed map first
     TMPRAST.reverse()  # reclassed map first
     for rast in TMPRAST:
     for rast in TMPRAST:
-        grass.run_command("g.remove", rast=rast, quiet=True)
+        grass.run_command("g.remove", flags='f', type='rast', pattern=rast, quiet=True)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     options, flags = grass.parser()
     options, flags = grass.parser()

+ 3 - 3
scripts/r.unpack/test_suite/test.r.unpack.sh

@@ -21,7 +21,7 @@ r.pack --o --v -c input=test_float  output=test_float_uncompressed.pack
 r.pack --o --v -c input=test_double output=test_double_uncompressed.pack
 r.pack --o --v -c input=test_double output=test_double_uncompressed.pack
 
 
 # Remove generated maps and re-import
 # Remove generated maps and re-import
-g.remove rast=test_int,test_float,test_double
+g.remove -f type=rast pattern=test_int,test_float,test_double
 # Second we check the import with r.unpack
 # Second we check the import with r.unpack
 
 
 r.unpack --o --v input=test_int.pack
 r.unpack --o --v input=test_int.pack
@@ -42,5 +42,5 @@ r.unpack -o --v -o input=test_double_uncompressed.pack output=test_double_uncomp
 #r.out.ascii --o input=test_float_uncompressed output=test_float_uncompressed.ref dp=1
 #r.out.ascii --o input=test_float_uncompressed output=test_float_uncompressed.ref dp=1
 #r.out.ascii --o input=test_double_uncompressed output=test_double_uncompressed.ref dp=1
 #r.out.ascii --o input=test_double_uncompressed output=test_double_uncompressed.ref dp=1
 
 
-g.remove rast=test_int,test_float,test_double,test_int_uncompressed,test_float_uncompressed,test_double_uncompressed
-rm *.pack
+g.remove -f type=rast pattern=test_int,test_float,test_double,test_int_uncompressed,test_float_uncompressed,test_double_uncompressed
+rm *.pack

+ 2 - 2
scripts/r3.in.xyz/r3.in.xyz.py

@@ -178,7 +178,7 @@ from grass.script import core as grass
 
 
 
 
 def cleanup():
 def cleanup():
-    grass.run_command('g.mremove', flags = 'f',
+    grass.run_command('g.remove', flags = 'f',
 		      type = "rast", pattern = 'tmp.r3xyz.%d.*' % os.getpid(),
 		      type = "rast", pattern = 'tmp.r3xyz.%d.*' % os.getpid(),
 		      quiet = True)
 		      quiet = True)
 
 
@@ -310,7 +310,7 @@ def main():
     grass.verbose(_("Assembling 3D cube ..."))
     grass.verbose(_("Assembling 3D cube ..."))
 
 
     #input order: lower most strata first
     #input order: lower most strata first
-    slices = grass.read_command('g.mlist', type = 'rast', sep = ',',
+    slices = grass.read_command('g.list', type = 'rast', sep = ',',
 				pattern = 'tmp.r3xyz.%d.*' % os.getpid()).rstrip('\n')
 				pattern = 'tmp.r3xyz.%d.*' % os.getpid()).rstrip('\n')
     grass.debug(slices)
     grass.debug(slices)
 
 

+ 1 - 1
scripts/v.dissolve/v.dissolve.html

@@ -50,7 +50,7 @@ boundaries:
 
 
 <div class="code"><pre>
 <div class="code"><pre>
 # patch tiles after import:
 # patch tiles after import:
-v.patch -e `g.mlist type=vect pat="clc2000_*" separator=","` out=clc2000_patched
+v.patch -e `g.list type=vect pat="clc2000_*" separator=","` out=clc2000_patched
 
 
 # remove duplicated tile boundaries:
 # remove duplicated tile boundaries:
 v.clean clc2000_patched out=clc2000_clean tool=snap,break,rmdupl thresh=.01
 v.clean clc2000_patched out=clc2000_clean tool=snap,break,rmdupl thresh=.01

+ 1 - 1
scripts/v.dissolve/v.dissolve.py

@@ -40,7 +40,7 @@ import grass.script as grass
 
 
 def cleanup():
 def cleanup():
     nuldev = file(os.devnull, 'w')
     nuldev = file(os.devnull, 'w')
-    grass.run_command('g.remove', vect = '%s_%s' % (output, tmp), quiet = True, stderr = nuldev)
+    grass.run_command('g.remove', flags = 'f', type = 'vect', pattern = '%s_%s' % (output, tmp), quiet = True, stderr = nuldev)
 
 
 def main():
 def main():
     global output, tmp
     global output, tmp

+ 4 - 2
scripts/v.out.gps/v.out.gps.py

@@ -99,10 +99,12 @@ def cleanup():
     # only try to remove map if it exists to avoid ugly warnings
     # only try to remove map if it exists to avoid ugly warnings
     if tmp_vogb:
     if tmp_vogb:
 	if grass.find_file(tmp_vogb, element = 'vector')['name']:
 	if grass.find_file(tmp_vogb, element = 'vector')['name']:
-	    grass.run_command('g.remove', vect = tmp_vogb, quiet = True)
+	    grass.run_command('g.remove', flags = 'f', type = 'vect'
+                          pattern = tmp_vogb, quiet = True)
     if tmp_extr:
     if tmp_extr:
 	if grass.find_file(tmp_extr, element = 'vector')['name']:
 	if grass.find_file(tmp_extr, element = 'vector')['name']:
-	    grass.run_command('g.remove', vect = tmp_vogb, quiet = True)
+	    grass.run_command('g.remove', flags = 'f', type = 'vect',
+                          pattern = tmp_vogb, quiet = True)
 
 
 tmp = None
 tmp = None
 tmp_proj = None
 tmp_proj = None

+ 6 - 3
scripts/v.rast.stats/v.rast.stats.py

@@ -69,8 +69,10 @@ import grass.script as grass
 
 
 def cleanup():
 def cleanup():
     if rastertmp:
     if rastertmp:
-        grass.run_command('g.remove', rast=rastertmp, quiet=True)
-    grass.run_command('g.remove', rast='MASK', quiet=True, stderr=nuldev)
+        grass.run_command('g.remove', flags='f', type='rast',
+                          pattern=rastertmp, quiet=True)
+    grass.run_command('g.remove', flags='f', type='rast',
+                      pattern='MASK', quiet=True, stderr=nuldev)
     if mask_found:
     if mask_found:
         grass.message(_("Restoring previous MASK..."))
         grass.message(_("Restoring previous MASK..."))
         grass.run_command('g.rename', rast=(tmpname + "_origmask", 'MASK'),
         grass.run_command('g.rename', rast=(tmpname + "_origmask", 'MASK'),
@@ -279,7 +281,8 @@ def main():
     exitcode = grass.run_command('db.execute', input=sqltmp,
     exitcode = grass.run_command('db.execute', input=sqltmp,
                                  database=fi['database'], driver=fi['driver'])
                                  database=fi['database'], driver=fi['driver'])
 
 
-    grass.run_command('g.remove', rast='MASK', quiet=True, stderr=nuldev)
+    grass.run_command('g.remove', flags='f', type='rast',
+                      pattern='MASK', quiet=True, stderr=nuldev)
 
 
     if exitcode == 0:
     if exitcode == 0:
         grass.verbose((_("Statistics calculated from raster map <%s>") % raster) +
         grass.verbose((_("Statistics calculated from raster map <%s>") % raster) +

+ 18 - 9
scripts/v.to.lines/v.to.lines.py

@@ -89,22 +89,26 @@ def main():
     if 0 != grass.run_command('v.category', layer="2", type='boundary',
     if 0 != grass.run_command('v.category', layer="2", type='boundary',
                               option='add', input=input, out=input_tmp,
                               option='add', input=input, out=input_tmp,
                               quiet=quiet):
                               quiet=quiet):
-        grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=input_tmp, quiet=quiet)
         grass.fatal(_("Error creating layer 2"))
         grass.fatal(_("Error creating layer 2"))
     if 0 != grass.run_command('v.db.addtable', map=input_tmp, layer="2",
     if 0 != grass.run_command('v.db.addtable', map=input_tmp, layer="2",
                               columns="left integer,right integer",
                               columns="left integer,right integer",
                               quiet=quiet):
                               quiet=quiet):
-        grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=input_tmp, quiet=quiet)
         grass.fatal(_("Error creating new table for layer 2"))
         grass.fatal(_("Error creating new table for layer 2"))
     if 0 != grass.run_command('v.to.db', map=input_tmp, option="sides",
     if 0 != grass.run_command('v.to.db', map=input_tmp, option="sides",
                               columns="left,right", layer="2", quiet=quiet):
                               columns="left,right", layer="2", quiet=quiet):
-        grass.run_command('g.remove', vect=input_tmp, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=input_tmp, quiet=quiet)
         grass.fatal(_("Error populating new table for layer 2"))
         grass.fatal(_("Error populating new table for layer 2"))
 
 
     if 0 != grass.run_command('v.type', input=input_tmp, output=out_type,
     if 0 != grass.run_command('v.type', input=input_tmp, output=out_type,
                               from_type='boundary', to_type='line',
                               from_type='boundary', to_type='line',
                               quiet=quiet, layer="2"):
                               quiet=quiet, layer="2"):
-        grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=remove_names, quiet=quiet)
         grass.fatal(_("Error converting polygon to line"))
         grass.fatal(_("Error converting polygon to line"))
     report = grass.read_command('v.category', flags='g', input=out_type,
     report = grass.read_command('v.category', flags='g', input=out_type,
                                 option='report', quiet=quiet).split('\n')
                                 option='report', quiet=quiet).split('\n')
@@ -117,24 +121,29 @@ def main():
         if 0 != grass.run_command('v.edit', map=out_type, tool='delete',
         if 0 != grass.run_command('v.edit', map=out_type, tool='delete',
                                   type='centroid', layer=2, quiet=quiet,
                                   type='centroid', layer=2, quiet=quiet,
                                   cats='{mi}-{ma}'.format(mi=min_cat, ma=max_cat)):
                                   cats='{mi}-{ma}'.format(mi=min_cat, ma=max_cat)):
-            grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+            grass.run_command('g.remove', flags='f', type='vect',
+                              pattern=remove_names, quiet=quiet)
             grass.fatal(_("Error removing centroids"))
             grass.fatal(_("Error removing centroids"))
 
 
     try:
     try:
         if 0 != grass.run_command('v.db.droptable', map=out_type, layer=1,
         if 0 != grass.run_command('v.db.droptable', map=out_type, layer=1,
                                   flags='f', quiet=True):
                                   flags='f', quiet=True):
-            grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+            grass.run_command('g.remove', flags='f', type='vect',
+                              pattern=remove_names, quiet=quiet)
             grass.fatal(_("Error removing table from layer 1"))
             grass.fatal(_("Error removing table from layer 1"))
     except:
     except:
         grass.warning(_("No table for layer %d" % 1))
         grass.warning(_("No table for layer %d" % 1))
     if 0 != grass.run_command('v.category', input=out_type, option='transfer',
     if 0 != grass.run_command('v.category', input=out_type, option='transfer',
                               output=output, layer="2,1", quiet=quiet,
                               output=output, layer="2,1", quiet=quiet,
                               overwrite=overwrite):
                               overwrite=overwrite):
-        grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=remove_names, quiet=quiet)
         grass.fatal(_("Error adding categories"))
         grass.fatal(_("Error adding categories"))
-    grass.run_command('g.remove', vect=remove_names, quiet=quiet)
+    grass.run_command('g.remove', flags='f', type='vect',
+                      pattern=remove_names, quiet=quiet)
     if point:
     if point:
-        grass.run_command('g.remove', vect=out_temp, quiet=quiet)
+        grass.run_command('g.remove', flags='f', type='vect',
+                          pattern=out_temp, quiet=quiet)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     options, flags = grass.parser()
     options, flags = grass.parser()

+ 3 - 3
scripts/v.unpack/test_suite/test.v.unpack.sh

@@ -19,7 +19,7 @@ db.copy from_table=probe_orig to_table=probe_3_2
 db.copy from_table=probe_orig to_table=probe_3_3
 db.copy from_table=probe_orig to_table=probe_3_3
 
 
 # Removing un-needed vectors and tables
 # Removing un-needed vectors and tables
-g.remove vect=probe_orig
+g.remove -f type=vect pattern=probe_orig
 v.db.droptable -f map=probe_3 table=probe_3 layer=1
 v.db.droptable -f map=probe_3 table=probe_3 layer=1
 
 
 # Adding tables to layer
 # Adding tables to layer
@@ -37,7 +37,7 @@ v.pack --o -c input=probe_2 output=probe_2_uncompressed.pack
 v.pack --o -c input=probe_3 output=probe_3_uncompressed.pack
 v.pack --o -c input=probe_3 output=probe_3_uncompressed.pack
 
 
 # We need to clean before import
 # We need to clean before import
-g.remove vect=probe_1,probe_2,probe_3
+g.remove -f type=vect pattern=probe_1,probe_2,probe_3
 
 
 # Test the import with v.unpack
 # Test the import with v.unpack
 v.unpack --o input=probe_1.pack
 v.unpack --o input=probe_1.pack
@@ -55,5 +55,5 @@ v.category input=probe_2_uncompressed option=report
 v.unpack --o input=probe_3.pack output=probe_3_uncompressed
 v.unpack --o input=probe_3.pack output=probe_3_uncompressed
 v.category input=probe_3_uncompressed option=report
 v.category input=probe_3_uncompressed option=report
 
 
-g.remove vect=probe_1_uncompressed,probe_2_uncompressed,probe_3_uncompressed
+g.remove -f type=vect pattern=probe_1_uncompressed,probe_2_uncompressed,probe_3_uncompressed
 rm *.pack
 rm *.pack

+ 2 - 1
scripts/v.unpack/v.unpack.py

@@ -90,7 +90,8 @@ def main():
         grass.fatal(_("Vector map <%s> already exists") % map_name)
         grass.fatal(_("Vector map <%s> already exists") % map_name)
     elif overwrite == '1' and gfile['file']:
     elif overwrite == '1' and gfile['file']:
         grass.warning(_("Vector map <%s> already exists and will be overwritten") % map_name)
         grass.warning(_("Vector map <%s> already exists and will be overwritten") % map_name)
-        grass.run_command('g.remove', quiet=True, vect=map_name)
+        grass.run_command('g.remove', flags='f', quiet=True, type='vect',
+                          pattern=map_name)
         shutil.rmtree(new_dir, True)
         shutil.rmtree(new_dir, True)
 
 
     # extract data
     # extract data

+ 0 - 1
temporal/t.list/t.list.html

@@ -47,7 +47,6 @@ t.list strds
 
 
 <em>
 <em>
 <a href="g.list.html">g.list</a>,
 <a href="g.list.html">g.list</a>,
-<a href="g.mlist.html">g.mlist</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.info.html">t.info</a>,
 <a href="t.info.html">t.info</a>,
 <a href="t.rast.list.html">t.rast.list</a>,
 <a href="t.rast.list.html">t.rast.list</a>,

+ 1 - 1
temporal/t.merge/testsuite/test.t.merge.sh

@@ -49,4 +49,4 @@ t.rast.list precip_abs4
 
 
 t.remove type=strds input=precip_abs1,precip_abs2,precip_abs3,precip_abs4
 t.remove type=strds input=precip_abs1,precip_abs2,precip_abs3,precip_abs4
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=rast pattern=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6

+ 1 - 1
temporal/t.rast.accdetect/t.rast.accdetect.py

@@ -418,7 +418,7 @@ def main():
     # Remove empty maps
     # Remove empty maps
     if len(empty_maps) > 0:
     if len(empty_maps) > 0:
         for map in empty_maps:
         for map in empty_maps:
-            grass.run_command("g.mremove", type="rast",  pattern=map.get_name(), quiet=True)
+            grass.run_command("g.remove", flags='f', type="rast",  pattern=map.get_name(), quiet=True)
 
 
 ############################################################################
 ############################################################################
 
 

+ 1 - 1
temporal/t.rast.accumulate/t.rast.accumulate.py

@@ -500,7 +500,7 @@ def main():
     # Remove empty maps
     # Remove empty maps
     if len(empty_maps) > 0:
     if len(empty_maps) > 0:
         for map in empty_maps:
         for map in empty_maps:
-            grass.run_command("g.mremove", type="rast",  pattern=map.get_name(), quiet=True)
+            grass.run_command("g.remove", flags='f', type="rast",  pattern=map.get_name(), quiet=True)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     options, flags = grass.parser()
     options, flags = grass.parser()

+ 1 - 1
temporal/t.rast.gapfill/test.t.rast.gapfill.sh

@@ -31,4 +31,4 @@ t.info type=rast input=prec_7
 
 
 t.unregister --v type=rast maps=prec_1,prec_2,prec_3,prec_6,prec_7
 t.unregister --v type=rast maps=prec_1,prec_2,prec_3,prec_6,prec_7
 t.remove --v type=strds input=precip_abs
 t.remove --v type=strds input=precip_abs
-g.remove rast=prec_1,prec_2,prec_3,prec_6,prec_7
+g.remove -f type=rast pattern=prec_1,prec_2,prec_3,prec_6,prec_7

+ 1 - 1
temporal/t.rast.import/test.t.rast.import.relative.sh

@@ -75,7 +75,7 @@ r.info prec_1
 # Cleaning up
 # Cleaning up
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.remove type=strds input=precip_rel
 t.remove type=strds input=precip_rel
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=rast pattern=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 rm -rf test
 rm -rf test
 rm strds_export.tar.bz2
 rm strds_export.tar.bz2
 rm strds_export.tar.gz
 rm strds_export.tar.gz

+ 1 - 1
temporal/t.rast.import/test.t.rast.import.sh

@@ -74,7 +74,7 @@ r.info prec_1
 # Cleaning up
 # Cleaning up
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.remove type=strds input=precip_abs1
 t.remove type=strds input=precip_abs1
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=rast pattern=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 rm -rf test
 rm -rf test
 rm strds_export.tar.bz2
 rm strds_export.tar.bz2
 rm strds_export.tar.gz
 rm strds_export.tar.gz

+ 1 - 1
temporal/t.rast.import/test.t.rast.import_locations.sh

@@ -59,7 +59,7 @@ ls -la $GISDBASE/new_test_4/PERMANENT
 
 
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 t.remove type=strds input=precip_abs1
 t.remove type=strds input=precip_abs1
-g.remove rast=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
+g.remove -f type=rast pattern=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6
 rm -rf test
 rm -rf test
 rm strds_export.tar.bz2
 rm strds_export.tar.bz2
 rm strds_export_pack.tar.gz
 rm strds_export_pack.tar.gz

+ 0 - 1
temporal/t.rast.list/t.rast.list.html

@@ -168,7 +168,6 @@ map_6@PERMANENT|map_6|PERMANENT|2002-06-25 00:00:00|2002-07-13 00:00:00|18.0|540
 
 
 <em>
 <em>
 <a href="g.list.html">g.list</a>,
 <a href="g.list.html">g.list</a>,
-<a href="g.mlist.html">g.mlist</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.create.html">t.create</a>,
 <a href="t.info.html">t.info</a>,
 <a href="t.info.html">t.info</a>,
 <a href="t.list.html">t.list</a>,
 <a href="t.list.html">t.list</a>,

+ 1 - 1
temporal/t.rast.mapcalc/test.t.rast.mapcalc.sh

@@ -47,7 +47,7 @@ t.rast.mapcalc -sn inputs=precip_abs1,precip_abs2 output=precip_abs4 \
 t.info type=strds input=precip_abs4
 t.info type=strds input=precip_abs4
 
 
 # Let the test fail
 # Let the test fail
-g.remove rast=prec_1
+g.remove -f type=rast pattern=prec_1
 t.rast.mapcalc -sn inputs=precip_abs1,precip_abs2 output=precip_abs4 \
 t.rast.mapcalc -sn inputs=precip_abs1,precip_abs2 output=precip_abs4 \
            expression=" (precip_abs1 + precip_abs2) * null()" base=new_prec \
            expression=" (precip_abs1 + precip_abs2) * null()" base=new_prec \
            method=equal nprocs=5
            method=equal nprocs=5

+ 1 - 1
temporal/t.rast.neighbors/t.rast.neighbors.py

@@ -185,7 +185,7 @@ def main():
             else:
             else:
                 names += ",%s" % (map.get_name())
                 names += ",%s" % (map.get_name())
 
 
-        grass.run_command("g.remove", rast=names, quiet=True)
+        grass.run_command("g.remove", flags='f', type='rast', pattern=names, quiet=True)
 
 
     dbif.close()
     dbif.close()
 
 

+ 2 - 2
temporal/t.rast.out.vtk/t.rast.out.vtk.py

@@ -144,8 +144,8 @@ def main():
             count += 1
             count += 1
 
 
     if use_granularity:
     if use_granularity:
-        grass.run_command("g.remove", rast=null_map)
-    grass.run_command("g.remove", rast=map_name)
+        grass.run_command("g.remove", flags='f', type='rast', pattern=null_map)
+    grass.run_command("g.remove", flags='f', type='rast', pattern=map_name)
 
 
 if __name__ == "__main__":
 if __name__ == "__main__":
     options, flags = grass.parser()
     options, flags = grass.parser()

+ 1 - 1
temporal/t.rast.series/test.t.rast.series.sh

@@ -32,4 +32,4 @@ r.info prec_sum
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6,prec_sum,prec_max
 t.unregister type=rast maps=prec_1,prec_2,prec_3,prec_4,prec_5,prec_6,prec_sum,prec_max
 t.remove type=strds input=precip_abs
 t.remove type=strds input=precip_abs
 
 
-g.remove rast=prec_sum,prec_max,prec_average
+g.remove -f type=rast pattern=prec_sum,prec_max,prec_average

+ 1 - 1
temporal/t.rast.to.rast3/t.rast.to.rast3.py

@@ -148,7 +148,7 @@ def main():
         if ret != 0:
         if ret != 0:
             grass.fatal(_("Unable to create 3D raster map <%s>" % output))
             grass.fatal(_("Unable to create 3D raster map <%s>" % output))
 
 
-    grass.run_command("g.remove", rast=null_map)
+    grass.run_command("g.remove", flags='f', type='rast', pattern=null_map)
 
 
     title = _("Space time voxel cube")
     title = _("Space time voxel cube")
     descr = _("This space time voxel cube was created with t.rast.to.rast3")
     descr = _("This space time voxel cube was created with t.rast.to.rast3")

+ 2 - 2
temporal/t.rast.to.rast3/testsuite/test_strds_to_rast3.py

@@ -68,7 +68,7 @@ class TestSTRDSToRast3(TestCase):
         """Remove generated data"""
         """Remove generated data"""
         #self.runModule("t.remove",  flags="rf",  type="strds",  
         #self.runModule("t.remove",  flags="rf",  type="strds",  
         #                           inputs="precip_i,precip_f,precip_d")
         #                           inputs="precip_i,precip_f,precip_d")
-        #self.runModule('g.mremove', type='rast', pattern='prec_*', flags='f')
+        #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
         self.del_temp_region()
         self.del_temp_region()
 
 
     def otest_3m(self):
     def otest_3m(self):
@@ -257,7 +257,7 @@ class TestSTRDSToRast3MultiGran(TestCase):
     def tearDown(self):
     def tearDown(self):
         """Remove generated data"""
         """Remove generated data"""
         #self.runModule("t.remove",  flags="rf",  type="strds", inputs="precip_d")
         #self.runModule("t.remove",  flags="rf",  type="strds", inputs="precip_d")
-        #self.runModule('g.mremove', type='rast', pattern='prec_*', flags='f')
+        #self.runModule('g.remove', type='rast', pattern='prec_*', flags='f')
         self.del_temp_region()
         self.del_temp_region()
 
 
     def otest_years(self):
     def otest_years(self):

+ 0 - 0
temporal/t.rast3d.list/t.rast3d.list.html


Некоторые файлы не были показаны из-за большого количества измененных файлов