You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ross Mark <ro...@controllingedge.com.au> on 2004/03/19 02:20:12 UTC
Submission for /contrib for a script that can version control filesystems
Last year I wrote a script for using subversion to version control
entire filesystems including symlinks, devices, ownership and
permissions of files and directories. Originally had posted it to the
mailing list and asked to do so again yesterday on the users@ list where
Sander pointed out that I was missing the licensing and also preferred
it come on the dev@ list. So here it is. I'm releasing it under GPL as a
number of the files in /contrib were already using this.
For a quick explanation this script is used as a replacement for svn.
All arguments will be passed directly to the svn program. Depending on
what the command is, commit, checkout, switch or update, the script will
perform some pre or post processing of the working copy. SVN properties
a used to record symlinks, devices and permissions with ownership. On
checkin the script scans the working copy or any changes and updates the
appropriate property prior to calling svn. On a checkout, switch or
update, after calling svn the script checks the property entries on each
file and directory and updates the working copy as appropriate. As
symlinks and devices are identified they are automatically added into
the svn:ignore property.
The names of properties used can be easily changed by updating the
variables in the start of the asvn script. I'm not aware of any standard
being proposed for how properties should be named. Currently I use
"dir:symlinks", dir:devices" and "file:permissions". I am happy for the
script to be changed to use the asvn name space so they are associated
with the script or a different name space that is more generic if other
tools want to access them.
I have only run the script on Red Hat 7 and 8 systems so there may be
some portability issues as I do parse the output of many system commands
when inspecting the working copy.
I'll be the first to admit that the script is not the most polished and
possibly a perl script would do the job better but it appears to work so
I'm happy.
If there is something else that is required to do in order to get this
added to the contrib section please let me know and I'll endeavor to do
so. Since originally posting the script to the mailing list last year I
have had a few inquiries about it so I believe including it as part of
the archive would be of benefit to others.
Cheers
Ross