tags:

views:

175

answers:

2

Here is the deal:

  1. I created an SVN repository, say, foo. It is at http://www.example.com/foo.

  2. Then I did an svn checkout.

  3. I made some updates and changes to my local copy of the code over the week. I haven't committed yet.

  4. I realized that I wanted to rename the repository. So I did this:

svn copy http://example.com/foo http://example.com/bar

svn delete http://example.com/foo

  1. I finish my changes (and local svn still thinks I'm working under "foo".) svn commit fails because the repo has been renamed.

  2. I try to use svn switch --relocate but it yells at me because svn is awful.

  3. I try using the script here to replace "foo" with "bar" in my billion .svn/ folders.

  4. This replace is taking a long time. I wonder if something hung? Or maybe sshfs failed? I kill it. Ctrl-C.

  5. I look and see that half my files have "foo" and the others have "bar" in the URLs in the sundry .svn/ folders.

All I want to do is commit my files with the new name. I could re-checkout the branch, but then I have no way to remember which files I changed, which is why I was using version control in the first place, and svn is so godawful at moving and renaming things.

What do I need to do to:

  1. Have a "clean" copy of my "bar" svn branch? and, most importantly:

  2. Commit the changes I made?

+1  A: 

--relocate is only used for base URL changes.

Try svn cleanup then svn switch --force

Travis
I did an "svn cleanup" (which took a while but didn't really do anything - different "entries" files still had different URLs) and then did an "svn switch" - without the --force. This did the trick. I thought "switch" would clobber my local changes but then I looked at the manual a bit closer. thanks!
rascher
+1  A: 

If you do need to checkout a fresh version and then make all your changes again it should be a fairly simply process of just pushing them over to the new checkout - you don't need to remember them, use a tool like Beyond Compare to quickly show you the diffs and copy them over.

Even when source control is working perfectly I spend a fair bit of time reviewing diffs (ie: before commit etc).

Michael Shimmins
hm, that makes me think: could I just do a `diff` on the two directories, ignoring ".svn" folders, and then `patch`? Do you know how that might work?
rascher
Could do - I'm not that familiar with the patch command in SVN (don't do much directly on its command line sorry). But its the same principle I believe as using a compare tool and applying changes directly to the files line by line.
Michael Shimmins