tags:

views:

145

answers:

6

I am studying a large software project and how it evolved. I have access to the subversion repository to analyze the code but I would like to have a copy of this repository on my machine. I want to do this so I'm not hanging on the production svn and also because I'm assuming it would be faster for me to work against a local repo than a remote one.

So, two questions:

  1. How can I estimate the size of the repo with all the changes up to now?
  2. How can I copy the repo so that I get the full change history locally?
A: 

i would recomend using svk

solomongaby
+6  A: 

svnsync should do the trick.

orip
svnsync only allows for read only access and i am not sure that this is what he wants
solomongaby
For studying how a large software project evolved, a read-only copy is very likely what he wants.
orip
+1  A: 

You can use git svn clone to get a local Git repository, including the whole history.

Greg Hewgill
+1, I don't know why this was downvoted because it's a valid response. He doesn't need a local svn repository, just a local repository of any kind.
orip
git-svn is actually a pretty good way of syncing a svn repo locally.
JesperE
why bring git into this?
nickf
In addition to being a self-contained DVCS, Git is also a very capable Subversion client.
Greg Hewgill
+1  A: 

You can use "svnsync" to replicate a remote repository.

See the documentation here.

James Kolpack
+1  A: 

Assuming you won't be committing locally, I would recommend you setup a local mirror of the SVN repository in question using svnsync. There is a how-to here and it seems it can mirror the SVN structure to your local machine.

Thus:

  1. The size on the local machine will be as large as the on-disk size of the remote repository. If you have access to the filesystem on the remote machine, you can look that up.
  2. This comes automatically when you have a proper setup of svnsync.
paracycle
I'm on a Windows machine so I also used this other tutorial: http://dirk.net/2007/09/07/replicating-a-subversion-repository-to-a-windows-target-server/
greye
+3  A: 

You can create a local (read-only) mirror of the complete repository using svnsync.

The necessary steps are explained in the svn-book. The basic steps are:

# Create a local mirror repository.
svnadmin create local_mirror

# Create pre-revprop-change hook.
echo > local_mirror\hooks\pre-revprop-change.cmd

# Associate local mirror with remote repository.
svnsync init local_mirror repo_url

# Sync the repositories.
svnsync sync local_mirror

While using another VCS like git would work too, this allows you to use your svn tools as usual. Besides, in order to estimate the size of the repository you will need the same storage algorithms. Each VCS has its own way of storing stuff if you use another than svn the size of your local repo will most likely not match the size of the original repo.

wierob