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

Re: Getting the high revision number

From: John Calcote <jcalcote_at_novell.com>
Date: 2006-08-01 22:12:06 CEST

Robert,

I stated in a reply to Andrew that I had lied to you all. Sorry 'bout
that. I was scanning files in the repository subtree for the 'Last
Changed Rev:' tag, which allows me to use the highest revision number of
a subtree as the build revision number for that subtree.

Given this new information, do you see anything wrong with what I'm
doing? I appreciate the insight you've already provided.

Thanks again,
John

>>> Robert Wenner <robert.wenner@atsec.com> 8/1/2006 1:15 PM >>>
On Tuesday 01 August 2006 13:53, Reedick, Andrew wrote:
> a) You scare my inner CM child. The repository revision number(s)
and
> the code/workspace revision number(s) are not guaranteed to be the
> same, so your build number is random.

Why random?
The working copy revision number is what he has checked out, which is
what
he will use as build number and as code to build from.
If the working copy has no local modifications, that number is exactly

what he needs.
If he checks out a fresh working copy, he's fine as well.

> First, get the HEAD revision number of the project root using
> "svn info url/project_root".

Why not use svnversion, maybe in combination with a regex to just get
one
of the numbers?

> You will probably want to make the build area readonly
> to everyone but the build owner.

Most compilers I know of want to create object files....

Also, if the build is automated, there should always be only one build

job.

> The build number should be: url + rev_num. A revision number
> by itself is useless if you have multiple projects, releases,
branches,
> etc. in a repository.

Even if you do, the revision number can be fine if you say it's for the

foo product because you will always know the root of the foo project.

One could include tags or branch names, though, even if only for
marketing
purposes ("beta 2").

> If you are building from a workset, then you can use 'svn info
> root_dir_of_workspace' to get the revision number. However, this
> assumes that the entire workspace is on the same rev number and isn't
a
> mixed revision workspace.

Which is somewhat unlikely, but that's what svnversion is for.

Cheers,

Robert

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Aug 1 22:14:21 2006

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

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