= Using wget to get a Subversion repository ==

Sometimes, I want to get the contents of a Subversion repository, but I don't have access to a Subversion client. This is possible with wget, but it requires a little bit of trickery.

Here's an example for the Cedar Backup source tree:

wget -e robots=off -r -np -nH -R index.html              \
     -P cedar-backup2 --cut-dirs=4                       \
     -I /svn/software/cedar-backup2/trunk                \
     -X /svn/software/cedar-backup2/tags                 \        
     http://cedar-solutions.com/svn/software/cedar-backup2/trunk

If you have a proxy, you need to first configure it in the environment.

set http_proxy=www.my.proxy:9119

Then, you need to add a few flags to the wget call:

--proxy=on --proxy-user=XXXXX --proxy-passwd=XXXXX

The end result is a directory cedar-backup2 containing the contents of the trunk. Obviously, you can't sync it back into the repository automatically, but it's better than nothing.

WgetSubversion (last edited 2008-07-09 06:21:45 by localhost)