Try to svn checkout, but get: svn: '.' is already a working copy for a different URL

64,144

Solution 1

This sequence of commands should do it if you're in a hurry.

There's gotta be a way to update the working copy's reference url, but I don't know it off-hand.

$ svn diff > ../changes.patch
$ rm -rf * ..?*
$ svn checkout url
$ patch -p < ../changes.patch

Solution 2

You could try "svn switch". In the example at http:// svnbook.red-bean.com/en/1.0/ch04s05.html, it's as easy as:

 $ svn switch http:// svn.example.com/repos/calc/branches/my-calc-branch

But since you have subdirectory permissions issues, your plan to re-create public_html sounds like the best solution; just beware of typos with 'rm'. Try 'mv' to just move the old directory out of the way, which doesn't depend on subdirectory permissions.

You can use:

 $ mv public_html old_public_html
 $ mkdir public_html
 $ chmod 755 public_html
 $ cd public_html
 $ svn checkout url

Solution 3

I think that the best option in your case is to delete the folder and create it again doing the checkout from SVN

Solution 4

If you don't need a connection with your brother's repo, then just remove all his .svn dirs.

The permission issue is not related to SVN, definitely.

Share:
64,144
Admin
Author by

Admin

Updated on July 15, 2022

Comments

  • Admin
    Admin almost 2 years

    I'm trying to svn checkout into my public_html folder, but I get this error: svn: '.' is already a working copy for a different URL

    My brother already set up a boiler plate site for me, but I've changed it and put those changes into a repo of my own. How do I make this folder not be a working copy of the repo he set up originally?

    Can I delete the public_html folder and make a new one? I'm fine with starting from scratch, as I'm going to just checkout an already installed drupal site onto this site.

    I saw in another question that a solution may be to simply delete the .svn directory. I tried this, but it said permission denied for several subdirectories in .svn.

    Thanks in advance for ANY help, hope this question isn't too dumb...