You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Barry Roberts <ma...@crosswinds.net> on 2003/10/16 03:53:59 UTC

SVN Test Project Questions

I'm currently using CVS at work, but would like to switch to
SubVersion, so I have decided to use SVN for a test project.  Now I
just have to figure out how to make it wildly successful and easy to
use so everybody will want to switch from CVS ;-).

The project is for deploying builds, data files, and config files to
web and application servers.  Since svn claims to handle binary files
better than CVS, it seemed like a good excuse to use it.

With hook scripts it seems pretty simple (and similar to CVS) to keep
a checked out copy of the latest version of the files in a directory
ready to be deployed to the test servers.  At least that's how I
understand the docs.

The trick is, I would like to be able to use hook scripts to
automatically check out a copy to the production directory once it's
been tested and proven on the test servers.  I'm not sure how to do
that.  Is it possible to use a hook script to look for a particalur
tag/branch/copy and know that it means it's production ready?  I can't
tell if this is possible from reading the documentation.

I don't mind if this requires an extra step such as
tagging/branching/svn copying, but it would be nice if the hook script
could automatically recognize the action and check out the latest
production-ready version into the production directory.

Thanks,
Barry Roberts


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

Re: SVN Test Project Questions

Posted by Ben Collins-Sussman <su...@collab.net>.
Barry Roberts <ma...@crosswinds.net> writes:

> I don't mind if this requires an extra step such as
> tagging/branching/svn copying, but it would be nice if the hook script
> could automatically recognize the action and check out the latest
> production-ready version into the production directory.

Perhaps you can add some custom 'properties' to your tags.  Your
post-commit script can use the 'svnlook' program to see exactly what
changed in the commit.  If the commit created a new tag (in the /tags/
dir, or whatever you like), look for a custom property on the new tag
directory.  If present, do a production check-out.


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

Re: SVN Test Project Questions

Posted by John Peacock <jp...@rowman.com>.
Barry Roberts wrote:

> The trick is, I would like to be able to use hook scripts to
> automatically check out a copy to the production directory once it's
> been tested and proven on the test servers.  I'm not sure how to do
> that.  Is it possible to use a hook script to look for a particalur
> tag/branch/copy and know that it means it's production ready?  I can't
> tell if this is possible from reading the documentation.
> 

We're basically doing something like this currently with CVSNT and I'd recommend 
_against_ automating the production checkout.  We are using a POSTCOMMIT hook to 
keep the test server in sync with the repository.  Major rewrites happen on 
branches and minor tweaks happen on the trunk.  The production server is always 
on the trunk, but the test server can be on a branch.  It all works really well 
and we'll be following the same scheme when we move to Subversion.

The reason we manually force a production update is for consistency.  The 
production server should always be handled manually (IMHO), so that there is an 
official "release" when it is updated.  There are occasions when something that 
works fine on the test server will not work on the production server (forgot to 
update the include files, for example).  Rather than having the production 
server update automatically, the developer has to manually trigger the update, 
and then can more easily remember to immediately test the changes.

You have to also think about any time you have to revert the production server. 
  If you are based on an automatic trigger of some sort, do you delete the 
tag/branch?  And then what happens?  How does the server trigger know which 
version to revert to?  I think it is better to keep the production site a manual 
update only...

My 2 cents

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: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org