Help renaming svn repository
Here is the deal:
I created an SVN repository, say, foo. It is at
http://www.example.com/foo
.Then I did an svn checkout.
I made some updates and changes to my local copy of the code over the week. I haven't committed yet.
I realized that I wanted to rename the repository. So I did this:
svn copy http://example.com/foo
htt开发者_Go百科p://example.com/bar
svn delete http://example.com/foo
I finish my changes (and local svn still thinks I'm working under "foo".)
svn commit
fails because the repo has been renamed.I try to use
svn switch --relocate
but it yells at me because svn is awful.I try using the script here to replace "foo" with "bar" in my billion .svn/ folders.
This replace is taking a long time. I wonder if something hung? Or maybe sshfs failed? I kill it. Ctrl-C.
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:
Have a "clean" copy of my "bar" svn branch? and, most importantly:
Commit the changes I made?
--relocate is only used for base URL changes.
Try svn cleanup then svn switch --force
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).
精彩评论