greye
greye

Reputation: 9151

Mirroring subversion repo to own machine

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?

Upvotes: 1

Views: 415

Answers (5)

wierob
wierob

Reputation: 4359

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.

Upvotes: 3

paracycle
paracycle

Reputation: 7850

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.

Upvotes: 1

James Kolpack
James Kolpack

Reputation: 9382

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

See the documentation here.

Upvotes: 1

Greg Hewgill
Greg Hewgill

Reputation: 993881

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

Upvotes: 2

orip
orip

Reputation: 75467

svnsync should do the trick.

Upvotes: 5

Related Questions