3

When I am checking out a project or try to commit (I was previously able to do so), I receive the following error:

svn: 'C:\Users\username\workspace\ABC' is already a working copy for a different URL

where ABC is the project name. Any thoughts on how to fix this or what could be causing this?

5
  • What do you mean by "remove his changes and try to commit"? You'll need to be a little more specific about what you're actually doing. From that error, it sounds like you're moving content from one working copy to another and then trying to commit it - is that correct? Commented Oct 18, 2013 at 6:35
  • thanks for commenting - I'm receiving "svn: ...... is already a working copy for a different URL" - should I try svn switch via eclipse or some other option
    – ali haider
    Commented Oct 18, 2013 at 15:36
  • You mentioned that in your question. I'm asking what exact steps you're taking. What exactly do you mean by checking out a project which another developer had updated e.g. revision 2, remove his changes and try to commit,? What are you doing with the files and checkouts to accomplish this? Commented Oct 18, 2013 at 17:09
  • you can ignore that - I'm going to rephrase the question.
    – ali haider
    Commented Oct 18, 2013 at 18:48
  • I think the stuff you took out is relevant. This error implies that you took files from one working copy and put them in a different working copy. As I asked in my first comment, is that what you're trying to do? Commented Oct 18, 2013 at 19:30

4 Answers 4

2

Your working directory contains .svn subdirectory that points to some repository, use following to take your next step towards resolving your issue: (info, status and resolve):

  • svn info - info: Display information about a local or remote item.
  • svn status - status (stat, st): Print the status of working copy files and directories.
  • svn resolve - resolve: Resolve conflicts on working copy files or directories.
2

I'm way late to this party, but faced the same problem. I had just migrated from an older svn version to a newer one, and a newer server. The local working directories were still pointing at the old server. The svn relocate command fixed the problem. see:

D:\dev\svn_monitor>svn help relocate
relocate: Relocate the working copy to point to a different repository root URL.
usage: 1. relocate FROM-PREFIX TO-PREFIX [PATH...]
       2. relocate TO-URL [PATH]

  Rewrite working copy URL metadata to reflect a syntactic change only.
  This is used when a repository's root URL changes (such as a scheme
  or hostname change) but your working copy still reflects the same
  directory within the same repository.

  1. FROM-PREFIX and TO-PREFIX are initial substrings of the working
     copy's current and new URLs, respectively.  (You may specify the
     complete old and new URLs if you wish.)  Use 'svn info' to determine
     the current working copy URL.

  2. TO-URL is the (complete) new repository URL to use for PATH.

  Examples:
    svn relocate http:// svn:// project1 project2
    svn relocate http://www.example.com/repo/project \
                 svn://svn.example.com/repo/project

Valid options:
  --ignore-externals       : ignore externals definitions

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG (caution: on many operating
                             systems, other users will be able to see this)
  --password-from-stdin    : read password from stdin
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting (default is to prompt
                             only if standard input is a terminal device)
  --force-interactive      : do interactive prompting even if standard input
                             is not a terminal device
  --trust-server-cert      : deprecated; same as
                             --trust-server-cert-failures=unknown-ca
  --trust-server-cert-failures ARG : with --non-interactive, accept SSL server
                             certificates with failures; ARG is comma-separated
                             list of 'unknown-ca' (Unknown Authority),
                             'cn-mismatch' (Hostname mismatch), 'expired'
                             (Expired certificate), 'not-yet-valid' (Not yet
                             valid certificate) and 'other' (all other not
                             separately classified certificate errors).
  --config-dir ARG         : read user configuration files from directory ARG
  --config-option ARG      : set user configuration option in the format:
                                 FILE:SECTION:OPTION=[VALUE]
                             For example:
                                 servers:global:http-library=serf
0

I faced a similar issue when I delected my local WD and tried to checkout again. Be sure to give the exact path of the SVN directory as there will be other directories with .svn files so it will have a conflict.

-1

This will help for sure:

  • Remove all .svn directories from your system (you might want to create a backup)
  • Do a new checkout of your repository

You might want to use the following DOS commands to find .svn directories:

cd \
dir /s .svn

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .