tags:

views:

168

answers:

7

So I have a project on a remote file system (that I have been editing via ssh). Now I need to copy the project onto my hard drive. I don't really need version control on the project anymore, so this makes me think that I should svn export the project. But there are files that haven't been checked in yet, that I need to preserve when I make the copy.

What would be the best way to copy this project onto my local drive?

Update: I'm not sure how to do it, but I would like to just copy all the files (using some sort of ssh secure copy command) then worry about the svn stuff later.

Update: This is what I ended up doing to copy the project to my local drive:

scp -r username@remotehost:/path/to/dir ./localdir
A: 

Maybe not the easiest possible way, but certainly the most obvious. I'd just svn export the current repository to another directory and manually merge in any local changes.

Matt Kellogg
A: 

If you don't need version control on the project anymore, why not simply check in your uncommitted changes first, and then do a svn export?

Ether
A: 

If you use TortoiseSVN, you can do Export All from your working folder, copies non-committed files as well.

RedFilter
+2  A: 

Leave your working copy the way it is. Now you need to recursively remove all the .svn dirs starting from the root dir of you project:

If you're on linux, you can use the following:

rm -rf `find . -type d -name .svn`

If you're on windows, this should work:

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G"

Make sure to make a backup before trying either of these commands! But I've used both of these to disconnect from svn successfully before.

Dave Paroulek
+1  A: 

svn switch your project to a branch, check in your local changes, then export the branch. You really want to be able to do the export in a repeatable way, so even if you don't need version control on the local copy, make sure the full tree it comes from the repository export.

BenB
A: 

Rather than exporting from the repository and then manually moving over files that were not checked in, you could just make a copy of your working copy and then remove the .svn files that contain the subversion revision information.

On UNIX (Mac/Linux) you can get rid of these easily with this command:

find /path/to/copied/project -name .svn -delete
benzado
+2  A: 

Since you have ssh access, I'd use rsync.

rsync -avz --exclude='*/.svn*' user@host:/path/to/checkout /path/to/local/dir

Rsync is great for this. Note also that user@host:/path/to/checkout and user@host:/path/to/checkout/ are different. The former copies the directory, the latter copies the contents of the directory.

Kaleb Pederson
this looked promising but I am running into lots of errors trying to do this.
Andrew
What kind of errors? The '-a' flag will sometimes give you harmless errors about permissions.
Kaleb Pederson
Just tested and verified command on my machines and it worked for me. Need more info to help further.
Kaleb Pederson