[GRASS-dev] [GRASS GIS] #2506: g.rename fails to rename map when there is already map of the same name in PERMENENT

#2506: g.rename fails to rename map when there is already map of the same name in
PERMENENT
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.rename | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------
In a mapset (different than PERMANENT) I run:

{{{
g.rename raster=mymap,elevation
WARNING: <elevation> already exists in mapset <PERMANENT>
}}}
It doesn't rename it. When I use overwrite, it works. Still it seems it's
a bug.

Also when I add there my current mapset, it fails, and I thought we
decided that current mapset should be supported when specifying output map
names.

{{{
g.rename raster=mymap,elevation@mycurrentmapset
WARNING: Illegal filename <elevation@mycurrentmapset>. Character <@> not
allowed.
WARNING: <elevation@mycurrentmapset> is an illegal file name
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2506&gt;
GRASS GIS <http://grass.osgeo.org>

#2506: g.rename fails to rename map when there is already map of the same name in
PERMENENT
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.rename | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

The map is not renamed because G70 still uses abbreviated element names
(ie. `rast`). `g.rename` silently fails because of
source:grass/branches/releasebranch_7_0/lib/manage/list.c#L47

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2506#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#2506: g.rename fails to rename map when there is already map of the same name in
PERMENENT
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.rename | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by martinl):

In GRASS 71 (trunk) it works.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2506#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#2506: g.rename fails to rename map when there is already map of the same name in
PERMENENT
-------------------------+--------------------------------------------------
Reporter: annakrat | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 7.0.0
Component: Default | Version: svn-trunk
Keywords: g.rename | Platform: Unspecified
      Cpu: Unspecified |
-------------------------+--------------------------------------------------

Comment(by wenzeslaus):

Replying to [comment:2 martinl]:
> In GRASS 71 (trunk) it works.

Not for me with older trunk. I have r62726 (before any renaming) and I'm
getting:

{{{
  > r.mapcalc "aaa = 1"
  100%
  > g.list rast mapset=.
aaa
  > g.rename rast=aaa,elevation
WARNING: <elevation> already exists in mapset <PERMANENT>
  > g.list rast mapset=.
aaa
  > g.rename rast=aaa,elevation --o
Rename raster <aaa> to <elevation>
  > g.list rast mapset=.
elevation
}}}

{{{
GRASS version: 7.1.svn
GRASS SVN Revision: 62726M
Build Date: 2014-11-18
Build Platform: x86_64-unknown-linux-gnu
GDAL/OGR: 1.10.1
PROJ.4: 4.8.0
GEOS: 3.4.2
SQLite: 3.8.2
Python: 2.7.6
wxPython: 2.8.12.1
Platform: Linux-3.13.0-40-generic-x86_64-with-Ubuntu-14.04-trusty
}}}

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2506#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>