[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: rationale for 'svnversion' (vs 'svn version') ?

From: John Peacock <jpeacock_at_rowman.com>
Date: 2005-03-28 18:18:54 CEST

Marton Fabo wrote:
> Sorry for my not really informed chopping into the discussion - but I
> guess having to modify the repository itself just to capture a state for
> the duration of a build script (which could just as well be captured by
> reading a value and storing it in a shell variable or equivalent), isn't
> a really efficient use of available tools and resources either...

There's a couple of reasons I think making a tag is more efficient:

1) Maintainability - if you use the revision method than every single
call to check out or export has to include that number in the command
line; sure you only need to program the script once, but it's an extra
datapoint you need to remember to include if you add something to the
build script later.

2) Repeatability - if something happens on the client which interrupts
the build (you ran out of diskspace), there is no record of when the
build started and what the rev was (unless you write that out at the
beginning of the build); with a copy, the remote repository has a record
of what the state was at the beginning of the build without having to
play with 'svn log'.

3) Visibility - if, as I suggested, an automated build process tags,
builds, tests, and deletes the tag only on success, then you get a
built-in record of failed builds; under a different protocol you could
have the build script check for an existing build cycle, so two people
wouldn't be able to build at the same time (for example if there were
some external resources which were limited, like a database).

4) Durability - a shell variable or equivalent is even more ephemeral
than the current HEAD revision, since it will last only as long as the
script (again, unless you store that somehow); with a copy, that
information is permanently inscribed in the repository (even if the tag
itself is deleted).

5) Speed - you can keep a working copy checked out and use 'svn switch'
to move to the next build snapshot much faster than checking out a fresh
copy; yes, you say, you can do this with -rREV just as easily, but then
there is no significance imparted by 'svn info' in that WC; if you have
a standard tag nomenclature, you can add meta-information based on the
path to the tag.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 28 18:19:45 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.