views:

89

answers:

4

Is it possible to get all revisions of a project copied onto my local machine? Basically, what I'd like is to be able to pull projects W, X, Y, and Z out of a remote SVN repository and have access to them on my computer, ideally in a locally running copy of SVN. Ideally I'd like to do this using a GUI tool of some sort because my unix skills are limited and I don't have ready access to a *nix box at work.

I don't have direct access to the server in question, so I'm limited to methods that can be done on a snv client machine.

My first goal is to have a backup of the code before the server it's on is shut down. I have that in a basic form just from doing a checkout, but I'd like to maintain the change history if possible. Being able to maintain a sync as long as the server is up would be useful as well, but because any additional edits to the code aren't particularly likely to occur at this point is a lower priority objective.

+2  A: 

Subversion is a 'server' based version control system. What you are asking about, fits better to a 'distributed version control system'. Using git-svn, you may have a local copy, while still contributing to the central (subversion) repository.

zellus
That's true. At the moment my main concern is the long term availability of the 3rd party server. A unidirectional snapshot would be sufficient for archival purposes. That sort of bi-directional link is overkill if there's anything less intensive available.
Dan Neely
I'm asking you the same question I did Rup. What would the granularity be for this approach. There are projects in the 3rd party repository I don't want to bring over.
Dan Neely
What is your primary goal? Decoupling, archiving or local offline access to source control.
zellus
@zellus edited question with that information.
Dan Neely
Getting involved with a DVCS, in this case git, might be benefiting in the future. Following a svn repository with git-svn may be done with a few commands.
zellus
In the long term perhaps, but in the short/medium term the advantage of being able to scream at the help desk when something needs configured or breaks vs having to do all the admin work myself is weighted heavily against GIT or Mercurial; and I'm not enough of an office politician to get enough people using a rouge server that IT will be forced to accept ownership of it to mitigate risk. NTM unlike VSS and Clearcase SVN actually works well without any glaringly obvious deficiencies which would make politicking even more difficult.
Dan Neely
I like to take on riks ;-). It makes a big difference whether it's a group or one person solution. Setting up your personal git-svn clone is a matter of minutes. Introduction a new version control tool/strategy is more demanding as you pointed out.
zellus
A: 

You can make a backup with svnadmin dump:

http://svnbook.red-bean.com/en/1.1/re31.html

Stefan Egli
you can't access the data, it's just a dump
CharlesB
you can load the data easily into a local repository. and it seems that it is about having a backup anyway.
Stefan Egli
If you can beg a dump from the 3rd party then you (or they) can use the bundled `svndumpfilter` script to reduce it to the portion of the repository you're interested in. Note that this doesn't (last time I tried) work with a `--deltas` dump, only `--incremental`.
Rup
A: 

There's also svnsync; you can use this to mirror into a local repository once you have set up a pre-commit-hook to enable revision property changes.

This uses client operations only; the svnadmin dump / load method is probably better to get started with at least if you can convince your admin to give you a repository dump.

Rup
What is involved in setting up a pre-commit hook? Ideally I'd like to use a repository on the company SVN server, but any configuration changes to it need to go through our IT department.
Dan Neely
Also, does svnsync allow control over the scope of what it gets? There're a number of projects in the 3rd party repository I don't want to grab copies of.
Dan Neely
For the hook, create the repository to sync into using `svnadmin create` then look in the `hooks` directory there; take `pre-revprop-change.tmpl` and either rename it to `.bat` on Windows or strip the extension and make it executable on Linux - i.e. only a minor file change. The comments in the file explain it well, although for a sync repository you probably want to just replace it all with `exit 0` (i.e. true). Selective sync: don't think so, sorry - or at least I've never done it and I don't see any arguments on initialize or sync for that. So may not be the best solution for you sorry.
Rup
+3  A: 

If your goal is just a taking a backup of the remote repo checkout http://rsvndump.sourceforge.net/. You would be able to take this dump with just user access and you don't need special privileges. Be reminded, its a commandline tool.

Version Control Buddy
@Version Control Buddy that looks much closer to what I want than anything else I've seen so far. I'd need to pull dumps for 4 urls though (base/app1, base/app2, base/lib1, and base/lib2). Do you know if this tool would either let me specify multiple URLs, or if I can combine the dumps into a single local repository and have the revision data all match up (ie for a checkin that affected several of the separate dumps).
Dan Neely
Nope, I am not aware of any option to give 4 URL's in the same command. I have not tried dumping all 4 URL's into one repository personally. But my gut feel says it will work. Do keep us posted if it works.
Version Control Buddy