-
-
Notifications
You must be signed in to change notification settings - Fork 295
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GIS_H_VERSION: use git hash #325
Conversation
previously, GIS_H_VERSION was the svn revision number of gis.h and GIS_H_DATE was the svn revision date of gis.h now they are the git hash and date of the last change to GRASS headers (and anything else in include) in g.version, these have been and are still referred to as GIS library revision number and date which is wrong, these are GIS headers revision number and date, which is not the same
|
@metzm , are r.in.gdal/r.proj/v.proj related commits relevant to this PR? Thanks for clarification. |
No, I must have created this feature branch from another feature branch. I will remove these commits from this feature branch. |
This reverts commit 0624e6d.
|
Thanks for clarifying the headers versus library. I agree that having whole The new code looks like that it should work. I'm not sure if it is just a naming issue (see below), but can you please describe the reasons behind the following values (here or in the code)?
But the triplet below looks like fallback as well, or is it to provide a more readable error message to users when the check in It seems to me the name should be different. In Git, hash is really the hexadecimal string. The point in code history Git calls commit or revision like in Subversion. To keep in line with that terminology, what has "hash" in it should probably not contain anything else. So, what ends up being As for the renaming/backwards compatibility ( |
Yes,
Yes, the purpose is to provide a more informative error message. A git commit hash is not really informative for users not compiling GRASS from a git clone soucre.
The code in configure calls
Revision comes from svn, we are now on git. If you do not like GRASS_HEADERS_GIT_HASH, how about GRASS_HEADERS_GIT_VERSION in include/version.h.in: Maybe it is better to remove GIT from these macros, to be more generic. I am more interested in the content of GRASS_HEADERS_GIT_HASH and less interested in its name. *_GIT_HASH might be a bit restrictive. |
remove git reference from macro names
|
I just applied the patch locally, it now looks like this: To better understand:
is the current master hash: while comes from where? |
|
The git short hash fda3b24 comes from the latest change to include, see https://github.com/OSGeo/grass/commits/master/include ( Previously, GIS_H_VERSION was the svn revision number of gis.h and GIS_H_DATE was the svn revision date of gis.h. Now they are the git hash and date of the last change to GRASS headers (and anything else in include). As I mentioned in my initial commit, the name libgis_revision in the output of g.version was always misleading because it referred to the latest svn change of include/gis.h and not lib/gis. |
|
For me it looks good, what do you think, @wenzeslaus ? |
Ping |
|
Looks good for me. Actually, I like this one better than #365. Closing mine. As for naming, I prefer to use the more generic |
|
@metzm What is reason for duplication (version and date are already defined by separated variables)? Wouldn't be enough? |
|
@landam The reason is that |
use only git short hash as GRASS_HEADERS_VERSION
|
@metzm I would suggest to remove quotes from |
|
Seems we are fine to go now? |
I think so. |
|
@metzm Can we merge? |
|
Let me suggest, to:
|
|
For reference, it now looks like this: |
|
Is there a reason why |
|
Well |
|
Good catch! I agree it should use the same format (ideally, build_date).
…On Wed, Apr 1, 2020 at 6:01 PM Veronica Andreo ***@***.***> wrote:
Is there a reason why buid_date and libgis_date are displayed
differently? My OCD could not avoid noticing that, sorry :) Is it too
complex to display them with the same date format (ideally as in
build_date)?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#325 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABY4K5OQ3FR34SXRDOD3FTLRKO2TBANCNFSM4KO4KLZA>
.
--
Huidae Cho, Ph.D., GISP
GRASS GIS Developer
https://idea.isnew.info
|
Let's create a new PR for this purpose. |
previously, GIS_H_VERSION was the svn revision number of gis.h and GIS_H_DATE was the svn revision date of gis.h now they are the git hash and date of the last change to GRASS headers (and anything else in include) in g.version, these have been and are still referred to as GIS library revision number and date which is wrong, these are GIS headers revision number and date, which is not the same Co-authored-by: Huidae Cho <grass4u@gmail.com> Co-authored-by: Martin Landa <landa.martin@gmail.com>
See #478 |
In any case |
We can change If we need time, Actually, it also addresses the space issue and we can remove the What do you think? |
Would be fine. But let's discuss it in a new PR. |
* use space delimiter for GIS_H_VERSION * choose GRASS_VERSION_STRING list element * report header version and date * write GRASS_VERSION_GIT to grass.py * use GRASS_VERSION_GIT * write GRASS_VERSION_GIT to grass.py * fix tab indent * add date * add date * get date correctly after #325 * get date correctly after #325 * date: no indent, no quotes * Update lib/init/grass.py Co-Authored-By: Markus Neteler <neteler@gmail.com> Co-authored-by: Stefan Blumentrath <stefan@vm-srv-wallace.vm.ntnu.no> Co-authored-by: Martin Landa <landa.martin@gmail.com> Co-authored-by: Markus Neteler <neteler@gmail.com>
* use space delimiter for GIS_H_VERSION * choose GRASS_VERSION_STRING list element * report header version and date * write GRASS_VERSION_GIT to grass.py * use GRASS_VERSION_GIT * write GRASS_VERSION_GIT to grass.py * fix tab indent * add date * add date * get date correctly after #325 * get date correctly after #325 * date: no indent, no quotes * Update lib/init/grass.py Co-Authored-By: Markus Neteler <neteler@gmail.com> Co-authored-by: Stefan Blumentrath <stefan@vm-srv-wallace.vm.ntnu.no> Co-authored-by: Martin Landa <landa.martin@gmail.com> Co-authored-by: Markus Neteler <neteler@gmail.com>

Previously, GIS_H_VERSION was the svn revision number of gis.h and GIS_H_DATE was the svn revision date of gis.h.
Now they are the git hash and date of the last change to GRASS headers (and anything else in include)
In g.version, these have been and are still referred to as GIS library revision number (now git hash) and date which is wrong: GIS_H_VERSION and GIS_H_DATE refer to GIS headers, not the GIS library. This phrasing can not be changed without breaking backwards compatibility when parsing the output of g.version, because e.g.
libgis_revisionwould need to be changed togisheaders_version.