[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 16:31:48 CEST

Scott Palmer wrote:
> I would use it to ask at the beginning of by build procedure what the
> HEAD revision is and then checkout or export that specific version of
> all the projects. Also, for some things I do an export, so svnversion
> can't work on the WC anyway. I was just looking for a simple way to do
> an automated build for a specific rev. I don't want to have a person
> check the head revision number and type it in.

I'm trying to understand why you are not using Subversion's cheap copies
to perform this magic for you, rather than trying to capture some
ephemeral value like HEAD (which can change at any time).

A much more efficient way to do what it seems like you want to do is:

$ svn cp svn://repo/path/to/project svn://repo/path/to/tags/unique
$ svn co svn://repo/path/to/tags/unique ./local/path/project
or
$ svn export svn://repo/path/to/tags/unique ./export/path/project

If you are managing multiple sub-projects, make a copy of each into a
common top level directory in the repository, then export/checkout them
all at once.

Except for very small projects, it is probably wrong to build off of
HEAD; you should always tag then build off the tag. If your builds are
intended to be one-off (say by an automated build process), create a
./build directory in the repository at the same level as ./trunk,
./branches, and ./tags, then once the build has been verified as OK,
delete the copy (you can always get back to that if you need to using
the history). That way, your ./build directory normally contains only
failed builds (very useful for manual followup).

Is there some reason this method won't work much better for you than
trying to capture the value of HEAD at some point of time?

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 16:32:46 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.