You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by John Peacock <jp...@rowman.com> on 2006/02/24 18:47:06 UTC
Web site management and staging using Subversion
Someone just asked on the dev list about managing web site development
using Subversion and I sent her to the users list. It occurred to me it
would also be a good thing for me to flog my particular solution to this
problem.
I wrote SVN::Notify::Mirror, which allows me to keep multiple working
copies, on local and remote machines, automatically synced to changes in
the repository. The latest version of the module even supports switching
to a new tag, based on a regex.
It acts as a handler for the fairly magical SVN::Notify by David
Wheeler, along with the even more magical SVN::Notify::Config by
Autrijus Tang.
What these modules let me do is have a very simple to understand
post-commit script that looks like this:
#!/usr/bin/perl -MSVN::Notify::Config=$0
--- #YAML:1.0
'':
PATH: "/usr/bin:/usr/local/bin"
'path/in/repository':
handler: Mirror
to: "/path/to/www/htdocs"
'some/other/path/in/repository':
handler: Mirror
to: "/path/to/remote/www/htdocs"
ssh-host: "remote_host"
ssh-user: "remote_user"
ssh-tunnel: "10.0.0.2"
ssh-identity: "/home/user/.ssh/id_rsa"
'some/project/tags':
handler: Mirror
to: "/path/to/another/dir"
tag-regex: "RELEASE-"
For example, the config file above allows me to keep:
1. The local "test" web server up to date with changes to one path
2. A remote "test" web server up to date with changes to another
path (via SSH)
3. A "production" web server automatically switched to the latest
"release" tag of the trunk code
Moving a certain selection of files to the production server is as
simple as making a tag with a particular name (other tags are ignored).
The test server is always up to date with trunk (or whatever branch
you want to designate).
You can get SVN::Notify::Mirror from a CPAN site near you or here:
http://search.cpan.org/dist/SVN-Notify-Mirror/
It works with Perl (and doesn't require the Perl bindings for the
moment), but SVN::Notify doesn't currently work on Windows (though David
is thinking about how to do that).
HTH
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