michael-leonard / rfortran

Automatically exported from code.google.com/p/rfortran
0 stars 0 forks source link

Include subversion revision number in source code #88

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*** Please provide a description of the enhancement you are requesting.

Include subversion revision number in source code

*** If you have a coding solution to this enhancement please include the
file (or preferably a svn patch) as an attachment

Original issue reported on code.google.com by mark.th...@gmail.com on 26 Jan 2011 at 3:54

GoogleCodeExporter commented 9 years ago
Approach: 

Use SubWCRev - the tortoise svn command-line to get the latest revision of the 
working copy. 

See http://tortoisesvn.net/docs/release/TortoiseSVN_en/tsvn-subwcrev.html for 
further details

Note that there are alternatives, such as using $REV$ svn keyword, in the file, 
but $REV$ only gets the latest revision number of the file, not the working 
copy.  

Steps 
1. Create a template file RFORTRAN_SVN_Status.f90.tmpl, in src\core folder, 
which contains the keywords required by subWCREV
2. Add a pre-build step to project which calls subwcrev and takes, 
RFORTRAN_SVN_Status.f90.tmpl file and creates a RFORTRAN_SVN_Status.f90.f90 
file with relevant keywords substituted
3. Add RFORTRAN_SVN_Status.f90 to the project
4. Commit RFORTRAN_SVN_Status.f90.tmpl to respo, but do not commit 
RFORTRAN_SVN_Status.f90 file to the repo because it will create another revision

Issues/Notes

1. For RFortran users who do not have access to the repository/or tortoise SVN, 
this creates the following problems
(a) Pre-build step will cause an error

To mitigate (a), the pre-build step will only be applied to devel or 
unit_testing projects, not the main RFORTRAN_IVF_LIB or TEST_RFORTRAN_IVF  

Note the unit-testing project should be the last thing built and compiled prior 
to exporting RFortran 

(b) RFORTRAN_SVN_Status.f90 will not be exported from repository, during 
creation of the installerm (since unversioned files are not exported)

Need to add a manual step to copy RFORTRAN_SVN_Status.f90 from wc to the 
installer export directory, prior to creating the installer

2. This needs to also be undertaken for any dependencies, e.g. mutilslib

Original comment by mark.th...@gmail.com on 26 Jan 2011 at 4:14

GoogleCodeExporter commented 9 years ago
Notes 

3. Any projects that use RFortran source code should include the command in the 
pre-build step to ensure the SVN_STATUS is updated

Original comment by mark.th...@gmail.com on 26 Jan 2011 at 4:24

GoogleCodeExporter commented 9 years ago

Original comment by mark.th...@gmail.com on 14 Feb 2011 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by mark.th...@gmail.com on 14 Feb 2011 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by mark.th...@gmail.com on 14 Feb 2011 at 11:21