SVN “does not match expected URL”

Just encountered this issue with SVN when trying to update the repository:

URL ‘https://example.com/development’ of existing directory ‘c:\example\development’ does not match expected URL ‘https://example.com/development’

This error was the result of some playing around I did with setting up SVN on a different machine and using uppercase letters instead of all lowercase when I was importing the repository onto my new machine.

Windows does not let you have two folders in the same directory with the same name even if they do not use the same case letter case, but Linux does and because SVN is cross-platform compatible it needs to keep this in mind.

So if you somehow get into a situation where you have two URLs, one which includes uppercase characters and one that does not, then you could run into the above issue.

The way to fix this is to right-click on your repository and select “TortoiseSVN > Repo-browser” navigate to the problem folder and ensure that there is not two duplicate folders there. If there is a duplicate folder then you will need to remove once of them from your repository.

Comments (5)

  1. both server and client are on windows operation systems.
    This folder exist both on the server and on the client.
    Tried to delete and update etc.
    Thanks you for your time.

    Monday, July 25, 2011 at 6:31 am #
  2. Vaselinessa wrote::

    I’m hitting this problem right now, but I’ve checked the repository, and there is no capitalization issue: all lower case both locally and remotely. Any ideas? My error message reads:

    URL ‘svn://svn.pinneyapps.com/PIC/trunk/app/views/redirects’ of existing
    directory ‘C:\dev\PIC\trunk\app\views\admin\redirects’ does not match expected
    URL ‘svn://svn.pinneyapps.com/PIC/trunk/app/views/admin/redirects’

    Tuesday, July 26, 2011 at 2:07 pm #
  3. shgz wrote::

    Thank you very much for the solution. It saved me job :)

    Thursday, August 18, 2011 at 1:39 am #
  4. Kang wrote::

    This usually also happens when the same actions are not repeated on both sides. e.g. Delete folder A from within repo-browser, created folder A1 there. Then we rename of folder on local from A to A1.
    Any subsequent update and commit keeps getting the above said error already. Even if you change the names back, etc.

    Thursday, February 2, 2012 at 12:12 am #
  5. Kang wrote::

    Forgot to mention, the way to solve it, is to ensure the repo-browser contains the folder A1 correctly first….then delete the local folder. Finally do a UPDATE. That ensures all subsequent update and commits to be perfect.

    Thursday, February 2, 2012 at 12:15 am #