[GRASS-dev] [GRASS GIS] #587: WinGRASS: can't open a map for wxDigitizing

#587: WinGRASS: can't open a map for wxDigitizing
-------------------------------+--------------------------------------------
Reporter: hamish | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Keywords: wingrass digitize | Platform: MSWindows XP
      Cpu: x86-32 |
-------------------------------+--------------------------------------------
(moved here from osgeo4w bug # 37 http://trac.osgeo.org/osgeo4w/ticket/37
because it is seen both in the OSGeo4W and stand-alone installers)

  * wx-vdigit: toolbar comes up but always "No vector map selected for
editing.". In layer list I can choose "Start editing" and a "please wait
while map is opened for editing" message comes up on the bottom status
bar, but the "Stop editing" menu item never ungreys.

tested with both 6.4.0svn binary installers (latest).
both r36287?

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: assigned
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by martinl):

  * status: new => assigned
  * owner: grass-dev@lists.osgeo.org => martinl
* cc: grass-dev@lists.osgeo.org (added)

Comment:

It should have been fixed in r36987 (?)

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Changes (by hamish):

  * status: assigned => closed
  * resolution: => duplicate

Comment:

oh, ok. the installer's help "About GRASS" popup says it is based on
r36287 so just a working off an older build.

sorry for the noise.

H

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

ps- what'll it take to get the digitizer working for the wingrass builds?

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by martinl):

Replying to [comment:2 hamish]:
> oh, ok. the installer's help "About GRASS" popup says it is based on
r36287 so just a working off an older build.

well, it's revision of wxgui.py not the latest revision of the build.
Which is confusing.

M.

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by martinl):

Replying to [comment:3 hamish]:
> ps- what'll it take to get the digitizer working for the wingrass
builds?

to fix swig issues;-) Building vdigit/nviz extension is possible. Anyway
they fail because of the swig error.

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:4 martinl]:
> Replying to [comment:2 hamish]:
> > oh, ok. the installer's help "About GRASS" popup says it is based on
r36287 so just a working off an older build.
>
> well, it's revision of wxgui.py not the latest revision of the build.
Which is confusing.

oh, that is rather misleading then. maybe another reason to expedite this
g.version wish:
http://thread.gmane.org/gmane.comp.gis.grass.devel/33031

and/or wrap up ($cleaned$) GIS_H_VERSION into a new grass.py function.

> > ps- what'll it take to get the digitizer working for the
> > wingrass builds?
>
> to fix swig issues;-) Building vdigit/nviz extension is
> possible. Anyway they fail because of the swig error.

this?
http://thread.gmane.org/gmane.comp.gis.grass.devel/32222/focus=28609

Hamish

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:6 hamish]:
> and/or wrap up ($cleaned$) GIS_H_VERSION into a new grass.py
> function.

with some sort of two element output? (GRASS_VERSION_NUMBER, maybe
GRASS_VERSION_DATE as well)

any ideas how to set GRASS_VERSION_DATE to match time of GIS_H_VERSION
revision? "2009" covers a lot of development ground.

Hamish

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:7 hamish]:

> any ideas how to set GRASS_VERSION_DATE to match time of GIS_H_VERSION
revision? "2009" covers a lot of development ground.

{{{
#define GIS_H_DATE "$Date$"
}}}

Converting it into the desired format will require some processing
commands in configure.in or the Makefiles.

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:8 glynn]:
>
{{{
  #define GIS_H_DATE "$Date$"
}}}
>
> Converting it into the desired format will require some
> processing commands in configure.in or the Makefiles.

.... such as | cut -f2 -d'$' ? or do you mean date string format?

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by glynn):

Replying to [comment:9 hamish]:

> > Converting it into the desired format will require some
> > processing commands in configure.in or the Makefiles.
>
> .... such as | cut -f2 -d'$' ? or do you mean date string format?

I mean for any format other than the one SVN uses for $Date$.

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by martinl):

Replying to [comment:9 hamish]:
> Replying to [comment:8 glynn]:
> >
> {{{
> #define GIS_H_DATE "$Date$"
> }}}

done in r37043. The patch for g.version attached (comments?)

M.

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

#587: WinGRASS: can't open a map for wxDigitizing
---------------------------+------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: defect | Status: closed
  Priority: major | Milestone: 6.4.0
Component: wxGUI | Version: 6.4.0 RCs
Resolution: duplicate | Keywords: wingrass digitize
  Platform: MSWindows XP | Cpu: x86-32
---------------------------+------------------------------------------------
Comment (by hamish):

Replying to [comment:11 martinl]:
> >
{{{
  #define GIS_H_DATE "$Date$"
}}}
>
> done in r37043.

any objections to backporting this?

> The patch for g.version attached (comments?)

  * keep it easily parsable (on one line), and as backwards compatible as
possible for existing script parsing.

  * (for grass 7 only) s/GRASS/GRASS GIS/

  * flags for diff't info? (only if needed)

  * modify doc/howto_release.txt to say that GRASS_VERSION_DATE should be
manually set to the release day for official releases, and for SVN builds
take it from GIS_H_DATE?

  * append the numeric value portion of GIS_H_VERSION (ie rev #) to
GRASS_VERSION_NUMBER in the g.version output if 'svn' is found in
GRASS_VERSION_NUMBER. so it automatically looks like "6.4.0svn32001"
This way it could be backwards compatible for g6 script parsing.

  * is GRASS_VERSION_UPDATE_PKG relevant anymore for grass >= 5?

Hamish

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Changes (by hamish):

  * status: closed => reopened
  * type: defect => enhancement
  * component: wxGUI => default
  * summary: WinGRASS: can't open a map for wxDigitizing => svn versions
              should better reflect svn rev
  * platform: MSWindows XP => All
  * keywords: wingrass digitize => g.version
  * resolution: duplicate =>
  * cpu: x86-32 => All

Comment:

hijacked ticket, but the orig was a dud anyway

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):

Hi,

after some more thought and investigation, gis.h's version while useful
isn't as good as it could be (could be unchanged for months, especially in
the stable branch)

  - I propose to add a new -r flag to g.version to display raw
GIS_H_VERSION and GIS_H_DATE strings (no need to shell script style them
AFAICT). This will help people debug situations when the program detects a
libgis/module version mismatch. updated patch attached to this ticket.

either-
  - add an hook script in the svn server to automatically write the present
rev and date to a file in the checkin branch. is that possible without
doubling the rev count? (or setting off an endless loop..). "svnlook
youngest .`" and "`svnlook date .`" might help. see http://svnbook.red-
bean.com/en/1.5/svn.reposadmin.create.html#svn.reposadmin.create.hooks

  - or, modify the main Makefile and add "`svnversion -n .`" somewhere. see
http://subversion.tigris.org/faq.html#version-value-in-source But that
gives the rev of the overall repo, not just the branch we are using.

- so perhaps:
{{{
svn log --limit 1 --quiet --xml | grep 'revision=' | cut -f2 -d'"'
37100

svn log --limit 1 --quiet --xml | grep '<date>' | \
   sed -e 's/T.*//' -e 's/.*>//'
2009-05-10

svn log --limit 1 --quiet | grep '(' | \
   sed -e 's/.*(//' -e 's/)$//' | cut -f3,4 -d' '
May 2009
}}}

... the goal being that g.version could report like
{{{
  GRASS GIS 7.0svn37123 (May 2009)
}}}

where the rev number/date was the current branch's latest modification.
This would end up in grass.py as grass.script.revision() or something so
the Help->About window in the GUI could report something accurate.

for formal releases I would guess to skip all the svn stuff and just
hardcode "6.4.0" and "1 May 2009".

?,
Hamish

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by martinl):

Replying to [comment:14 hamish]:

{{{
> svn log --limit 1 --quiet --xml | grep 'revision=' | cut -f2 -d'"'
> 37100
>
> svn log --limit 1 --quiet --xml | grep '<date>' | \
> sed -e 's/T.*//' -e 's/.*>//'
> 2009-05-10
>
> svn log --limit 1 --quiet | grep '(' | \
> sed -e 's/.*(//' -e 's/)$//' | cut -f3,4 -d' '
> May 2009
}}}

why don't use

{{{
svn info
}}}

?

Martin

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by jef):

Replying to [comment:15 martinl]:
> why don't use
>
> {{{
> svn info
> }}}

> ?

or {{{svnversion}}}

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):

thanks for mentioning `svn info`, I hadn't seen that.

However, AFAICT "`svn info`" and "`svnversion`" both give the rev number
of the entire repo, not the latest change to that branch.

using the "`svn log`" method would keep the version unchanged for e.g.
GRASS 5.4.2 since the last time that branch was actually modified.
otherwise all branches+trunk versions change each time any modification is
made globally (e.g. to grass-web or trunk), when in fact they haven't
changed at all.

the downside of `svn log` is that it is rather slow and requires internet
access.

Hamish

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by hamish):

Replying to [comment:17 hamish]:
> the downside of `svn log` is that it is rather slow and requires
internet access.

... which probably disqualifies it, not to mention the extra load on the
server.

Hamish

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

#587: svn versions should better reflect svn rev
--------------------------+-------------------------------------------------
  Reporter: hamish | Owner: martinl
      Type: enhancement | Status: reopened
  Priority: major | Milestone: 6.4.0
Component: default | Version: 6.4.0 RCs
Resolution: | Keywords: g.version
  Platform: All | Cpu: All
--------------------------+-------------------------------------------------
Comment (by glynn):

Replying to [comment:14 hamish]:

> - or, modify the main Makefile and add "`svnversion -n .`" somewhere.
see http://subversion.tigris.org/faq.html#version-value-in-source But
that gives the rev of the overall repo, not just the branch we are using.

You need to handle the case of compiling from a snapshot tarball on a
system which doesn't have "svn".

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