On 6/29/05, Ben Collins-Sussman <sussman@collab.net> wrote:
>
> On Jun 29, 2005, at 2:08 AM, Robert Schneider wrote:
>
> >
> > So what is the BEST practice. Surely there a several
> > Approaches but I would like to know the perfect one, if
> > possible.
>
> <recording>
> The global revision number is NOT an indicator of the maturity of
> your software. It's just a global counter, something which names
> commits and marks off points in time. Because branches and tags live
> as ordinary directories along side the trunk, saying "I have r29382
> of the software" does not mean anything.
> </recording>
>
> The BEST practice is to do normal software release management
> procedures, ones that are used on all version control systems:
>
> 1. invent a a release numbering system that works best for you,
> something like "version 1.0, 1.1, ...", etc.
>
> 2. create release branches. tag releases. This is all described
> in the book at http://svnbook.red-bean.com/en/1.1/ch04s04.html#svn-
> ch-4-sect-4.4 .
>
> The global revision number has nothing to do with this best practice.
Without disagreeing with any of the arguments you make, I think there
is a use for revision, in conjunction with version/variant/whatever,
to yield finer granularity. Just as an example, here's a tool most of
the people on this list probably have installed:
bailey@localhost(0) ~ $ svn --version
svn, version 1.2.0 (r14790)
compiled May 24 2005, 17:27:57
(Note: The revision number here is fixed, and changed manually with
each release, lest I misrepresent Subversion practice.)
If, with all of the reservations above, one feels it's best to let the
application publish the revision from which it was built, you can
(for a C application) say something like
#define REVISION "$LastChangedRevision$"
...
int main(int argc, char **argv) /* env for those who want it */ {
unsigned int revision;
...
revision = strtoul(strchr(' ', REVISION) || "", NULL, 10);
...
}
in the source, and make sure keyword substitution for
LastChangedRevision is on in the source file containing the
definition. (This will break if you build from the WebDAV-served
repository rather than a working copy, since the keyword won't be
substituted.)
--
Regards,
Charles Bailey
Lists: bailey _dot_ charles _at_ gmail _dot_ com
Other: bailey _at_ newman _dot_ upenn _dot_ edu
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Jun 29 16:49:20 2005