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

RE: Re: getting a repository's latest revision

From: Monks, Peter <peter.monks_at_vignette.com>
Date: 2004-10-11 18:11:12 CEST

G'day Rob,

To get around this problem, our ant scripts tag (server side copy)
HEAD first, then our scripts operate against the tag from then on.
This ensures that our subsequent SVN operations are always against a
single revision (even if HEAD changes while the script is running).

Some might argue that because copies can't be frozen, we could have
the same problem operating against the tag as we do with HEAD, but in
practice this is a non-issue:

1. our developers are aware that they will have flaming bamboo shoots
   installed under their finger nails should they commit anything to
   any of the copies in our "tags" directory ;-)

2. most of the developers don't even know it exists (since they don't
   have the "tags" subdirectory in the repository checked out)

3. even if they do find out about the tags subdirectory, they'd have
   to be both extremely lucky and extremely fast to both find the tag
   that the script created and commit something to it in time for it
   to affect the script (the script typically only runs for about 11
   minutes, and of those only about 2 minutes is spent interacting
   with the repository)

If we were really paranoid, we could install the pre-commit hook
that's been mentioned on this list a few times that blocks commits to
certain directories. I'm not at that stage of paranoia (yet!). ;-)

Cheers,
Peter
 
----------------------------------------------------------------------
Peter Monks http://www.sydneyclimbing.com/
pmonks_at_sydneyclimbing.com http://www.geocities.com/yosemite/4455/
----------------------------------------------------------------------
 

 
 

> -----Original Message-----
> From: Mike Mason [mailto:mgm@thoughtworks.net]
> Sent: Monday, October 11, 2004 8:57am
> To: rob.hills@netpaver.com.au
> Cc: users@subversion.tigris.org
> Subject: Re: getting a repository's latest revision
>
> Rob Hills wrote:
>
> >Hi All,
> >
> >I use ant scripts to build our applications for release. As
> part of this process, source
> >code is exported from the repository to a temporary
> directory and built.
> >
> >In my ant script, this process often involves getting files
> from several different areas of
> >our repository and hence involves several "export"
> operations. To ensure I get a
> >consistent build, I use the same revision number for all my exports.
> >
> >
>
> Other folks have suggested how you might find that revision
> number, but
> you could also try using svn:externals. This allows you to pull
> different bits of your repository (or even multiple
> repositories) into a
> single directory. There are minor wrinkles if you want to
> make changes
> and commit them, but it sounds like you just want to do a
> build and not
> commit anything back.
>
> The book has more:
> http://svnbook.red-bean.com/svnbook-1.0/ch07s03.html
>
> Cheers,
> Mike.
>
> ---------------------------------------------------------------------
> 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 Mon Oct 11 18:11:43 2004

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.