Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Re-attaching source files to existing SVN

I recently had to re-install windows due to a faulty hard drive.. luckily I had all of my source files on another disk.

On my previous installation, I was using Tortoise SVN, which I've just re-installed on my new machine (a few months down the line).

How can I re-link my current source files to the SVN repository?

I'm worried that if I click the wrong thing, it will update my local copy with what's on the server.

Thanks Rich.

like image 546
Rich S Avatar asked Dec 06 '12 13:12

Rich S


1 Answers

You first need to create a working directory and the only way to do that is to do a checkout and get the files from the server.

HOWEVER, when you said source files, you meant working directory, you may be in luck anyway. Does your source files contain that .svn directory? If so, you have a working directory, and restoring your working directory on your new machine should work just fine. Just make sure you're working with the same version of TortoiseSVN that you had on the old system: Especially if one is pre-1.7 and the other was post-1.7. That's because the working copy layout changed from version 1.6.x to version 1.7.x. See if you have the .svn directory in each directory of your Subversion working directory, or only in the root. If it's only in the root, use TortoiseSVN version 1.7 or greater. If it's in all the directories, use TortoiseSVN version 1.6.x.

If you don't have those .svn directories (and they might be hidden), then you don't have a working directory. You'll have to do a checkout, and then manually move the files over that are different. Take a look at Beyond Compare to help you with this task.

like image 114
David W. Avatar answered Oct 26 '22 22:10

David W.