Just a late night idea. What about using the current revision number of the local SVN repository as the build number? Major, minor and revision number of ROS will be a matter of politics, but the build number will give an exact coordinate in the space of the source code evolution. Is there a way to get it in a portable way?
Emanuele
I would like to see the repository revision either replace the Build date, or be added to the Build date. Instead of:
ReactOS 0.3-SVN (Build 20050121)
have something like
ReactOS 0.3-SVN (Build 13128) or ReactOS 0.3-SVN (Build 20050121 Repo 13128)
I don't care so much as to when it was built, but what it was built from.
On Wed, 19 Jan 2005 23:09:45 +0100, Emanuele Aliberti ea@iol.it wrote:
Just a late night idea. What about using the current revision number of the local SVN repository as the build number? Major, minor and revision number of ROS will be a matter of politics, but the build number will give an exact coordinate in the space of the source code evolution. Is there a way to get it in a portable way?
Emanuele _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
I like this idea ReactOS 0.3-SVN (Build 20050121 Repo 13128) as build number
----- Original Message ----- From: "WaxDragon" waxdragon@gmail.com To: "ReactOS Development List" ros-dev@reactos.com Sent: Friday, January 21, 2005 11:14 AM Subject: Re: [ros-dev] Build number: a proposal
I would like to see the repository revision either replace the Build date, or be added to the Build date. Instead of:
ReactOS 0.3-SVN (Build 20050121)
have something like
ReactOS 0.3-SVN (Build 13128) or ReactOS 0.3-SVN (Build 20050121 Repo 13128)
I don't care so much as to when it was built, but what it was built from.
On Wed, 19 Jan 2005 23:09:45 +0100, Emanuele Aliberti ea@iol.it wrote:
Just a late night idea. What about using the current revision number of the local SVN repository as the build number? Major, minor and revision number of ROS will be a matter of politics, but the build number will give an exact coordinate in the space of the source code evolution. Is there a way to get it in a portable way?
Emanuele _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
-- The cheese stands alone. _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Magnus Olsen wrote: | I like this idea | ReactOS 0.3-SVN (Build 20050121 Repo 13128) | as build number
Why not do it in the format Windows seems to do: ReactOS 0.3.0-SVN (Build 20051010: Revision 14000). Or maybe with spaces for easier reading (Build 2005 10 10: Revision 14 000)?
Thanx
~ -uniQ
From: K McI
Magnus Olsen wrote: | I like this idea | ReactOS 0.3-SVN (Build 20050121 Repo 13128) | as build number
Why not do it in the format Windows seems to do: ReactOS 0.3.0-SVN (Build 20051010: Revision 14000). Or maybe with spaces for easier reading (Build 2005 10 10: Revision 14 000)?
The biggest obstacle I see is actually getting the SVN revision number in our source somewhere. Maybe our local SVN guru, aka Casper, has an idea how to do this?
Gé van Geldorp.
Ge van Geldorp wrote:
From: K McI
Magnus Olsen wrote: | I like this idea | ReactOS 0.3-SVN (Build 20050121 Repo 13128) | as build number
Why not do it in the format Windows seems to do: ReactOS 0.3.0-SVN (Build 20051010: Revision 14000). Or maybe with spaces for easier reading (Build 2005 10 10: Revision 14 000)?
The biggest obstacle I see is actually getting the SVN revision number in our source somewhere. Maybe our local SVN guru, aka Casper, has an idea how to do this?
The TortiseSVN folk have a little utility:
"SubWCRev.exe: a small command line tool which you can use in your build steps. It takes a file as an argument and replaces all "$WCREV$" strings with the revision of your working copy. This is useful if you want to include the Subversion revision in the version of your project. If you need an example, check out the TortoiseSVN source and/or have a look at the small help file."
http://tortoisesvn.tigris.org/download.html
- Joseph
Joseph Galbraith wrote:
Ge van Geldorp wrote:
From: K McI
Magnus Olsen wrote: | I like this idea | ReactOS 0.3-SVN (Build 20050121 Repo 13128) | as build number
Why not do it in the format Windows seems to do: ReactOS 0.3.0-SVN (Build 20051010: Revision 14000). Or maybe with spaces for easier reading (Build 2005 10 10: Revision 14 000)?
The biggest obstacle I see is actually getting the SVN revision number in our source somewhere. Maybe our local SVN guru, aka Casper, has an idea how to do this?
The TortiseSVN folk have a little utility:
"SubWCRev.exe: a small command line tool which you can use in your build steps. It takes a file as an argument and replaces all "$WCREV$" strings with the revision of your working copy. This is useful if you want to include the Subversion revision in the version of your project. If you need an example, check out the TortoiseSVN source and/or have a look at the small help file."
SubWCRev could be the solution, but it is not available under Linux, unless via WinE:
SubWCRev reads the Subversion status of all files in a working copy, excluding externals. Then the highest revision number found is used to replace all occurrences of "$WCREV$" in SrcVersionFile and the result is saved to DstVersionFile. The commit date/time of the highest revision is used to replace all occurrences of "$WCDATE$". The modification status is used to replace all occurrences of "$WCMODS?TrueText:FalseText$" with TrueText if there are local modifications, or FalseText if not.
usage: SubWCRev WorkingCopyPath [SrcVersionFile] [DstVersionFile] [-n|-d]
Params: WorkingCopyPath : path to a Subversion working copy SrcVersionFile : path to a template header file DstVersionFile : path to where to save the resulting header file -n : if given, then SubWCRev will error if the working copy contains local modifications -d : if given, then SubWCRev will only do its job if DstVersionFile does not exist
Hi,
The biggest obstacle I see is actually getting the SVN revision number in our source somewhere. Maybe our local SVN guru, aka Casper, has an idea how to do this?
The information is stored in the .svn folder, and would not be hard to extract procedurally.
Just execute "svnversion ." in any directory of the working copy. This prints the current revision number to standard output. Here is the online help for this tool:
===============
svnversion: invalid option: --help usage: svnversion [OPTIONS] WC_PATH [TRAIL_URL]
Produce a compact "version number" for the working copy path WC_PATH. TRAIL_URL is the trailing portion of the URL used to determine if WC_PATH itself is switched (detection of switches within WC_PATH does not rely on TRAIL_URL). The version number is written to standard output. For example:
$ svnversion . /repos/svn/trunk 4168
The version number will be a single number if the working copy is single revision, unmodified, not switched and with an URL that matches the TRAIL_URL argument. If the working copy is unusual the version number will be more complex:
4123:4168 mixed revision working copy 4168M modified working copy 4123S switched working copy 4123:4168MS mixed revision, modified, switched working copy
If invoked on a directory that is not a working copy, an exported directory say, the program will output "exported".
Valid options: -n [--no-newline] : do not output the trailing newline -c [--committed] : last changed rather than current revisions --version : show version information
===============
The output contains some more information as just the revision number. For example get see a trailing "M" after the number if any file in the WC is modified. To strip it, one might use a command like:
svnversion doc | sed s/[A-Z]// > svnrevision.inc
(or write another little tool that does this job and put it into the "tools" folder)
Regards,
Martin