Dear devs,
how do we get a string like
"Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) $"
for a module's manual? Is this dynamically created or is it hardcoded?
Thanks, Nikos
Dear devs,
how do we get a string like
"Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) $"
for a module's manual? Is this dynamically created or is it hardcoded?
Thanks, Nikos
On Mon, May 4, 2015 at 12:08 PM, Nikos Alexandris
<nik@nikosalexandris.net> wrote:
Dear devs,
how do we get a string like
"Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) $"
for a module's manual? Is this dynamically created or is it hardcoded?
Both You can copy it from another manual page. Then, to get it
updated by SVN, you need to define svn propset. this you can do with a
helper script:
sh ~/software/grass-addons/tools/module_svn_propset.sh yourfile
or
cd yourdir/
sh ~/software/grass-addons/tools/module_svn_propset.sh *
hope this helps,
Markus
Nikos Alexandris wrote:
> Dear devs,
> how do we get a string like
> "Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) $"
> for a module's manual? Is this dynamically created or is it hardcoded?
Markus Neteler:
Both You can copy it from another manual page. Then, to get it
updated by SVN, you need to define svn propset. this you can do with a
helper script:sh ~/software/grass-addons/tools/module_svn_propset.sh yourfile
or
cd yourdir/
sh ~/software/grass-addons/tools/module_svn_propset.sh *hope this helps,
A lot, thanks. How can I verify it actually updates the string? I did
as per the instruction above, then `svn up` (necessary?), then
re-compiled. Don't see an updated string though.
Nikos
* Nikos Alexandris <nik@nikosalexandris.net> [2015-05-04 13:52:22 +0300]:
Nikos Alexandris wrote:
> > Dear devs,
> > how do we get a string like
> > "Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) $"
> > for a module's manual? Is this dynamically created or is it hardcoded?Markus Neteler:
>
> Both You can copy it from another manual page. Then, to get it
> updated by SVN, you need to define svn propset. this you can do with a
> helper script:
>
> sh ~/software/grass-addons/tools/module_svn_propset.sh yourfile
>
> or
>
> cd yourdir/
> sh ~/software/grass-addons/tools/module_svn_propset.sh *
>
> hope this helps,A lot, thanks. How can I verify it actually updates the string? I did
as per the instruction above, then `svn up` (necessary?), then
re-compiled. Don't see an updated string though.
Oh man, maybe I meed to commit first... :-). Will re-check.
Thanks, Nikos
On Mon, May 4, 2015 at 6:59 AM, Nikos Alexandris <nik@nikosalexandris.net> wrote:
- Nikos Alexandris <nik@nikosalexandris.net> [2015-05-04 13:52:22 +0300]:
Nikos Alexandris wrote:
Dear devs,
how do we get a string like
"Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014) quot;
for a module’s manual? Is this dynamically created or is it hardcoded?Markus Neteler:
Both You can copy it from another manual page. Then, to get it
updated by SVN, you need to define svn propset. this you can do with a
helper script:sh ~/software/grass-addons/tools/module_svn_propset.sh yourfile
or
cd yourdir/
sh ~/software/grass-addons/tools/module_svn_propset.sh *hope this helps,
A lot, thanks. How can I verify it actually updates the string? I did
as per the instruction above, thensvn up
(necessary?), then
re-compiled. Don’t see an updated string though.Oh man, maybe I meed to commit first… :-). Will re-check.
Yes, you need to commit first. FWIK, this feature (adding dates, versions, etc. to files) was very popular in the times of CVS and it have became quite controversial now, especially among those using Git.
It is advantageous for manual pages because it adds the recent change to the file which would be otherwise hard to do manually. Doing this automatically on compile time wouldn’t be so straightforward because you can just compile from tar without svn (and thus having no idea about the versions, dates and authors). The disadvantages include tracking last change in documentation rather than algorithm and messy source code and diffs (especially unnecessary differences between branches).
Thanks, Nikos
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev
Nikos Alexandris wrote:
> > > > Dear devs, how do we get a string like
> > > > "Last changed: $Date: 2014-12-01 17:21:35 +0200 (Mon, 01 Dec 2014)
> > > > for a module's manual? Is this dynamically created or is it hardcoded?
Markus Neteler:
> > > Both You can copy it from another manual page. Then, to get it
> > > updated by SVN, you need to define svn propset. this you can do with a
> > > helper script:
> > >
> > > sh ~/software/grass-addons/tools/module_svn_propset.sh yourfile
> > >
> > > or
> > >
> > > cd yourdir/
> > > sh ~/software/grass-addons/tools/module_svn_propset.sh *
> > >
> > > hope this helps,
Nikos:
> > A lot, thanks. How can I verify it actually updates the string? I did
> > as per the instruction above, then `svn up` (necessary?), then
> > re-compiled. Don't see an updated string though.
>
> Oh man, maybe I meed to commit first... :-). Will re-check.
Vaclav Petras:
Yes, you need to commit first. FWIK, this feature (adding dates, versions,
etc. to files) was very popular in the times of CVS and it have became
quite controversial now, especially among those using Git.
Was/Is there a discussion about moving to git?
It is advantageous for manual pages because it adds the recent change to
the file which would be otherwise hard to do manually.
Not only hard. Easy to forget also.
Doing this
automatically on compile time wouldn’t be so straightforward because you
can just compile from tar without svn (and thus having no idea about the
versions, dates and authors).
Makes sense.
The disadvantages include tracking last change in documentation rather than
algorithm and messy source code and diffs (especially unnecessary differences between branches).
!
Thanks, Nikos