Reputation: 2632
Recently I've been experimenting with svn:externals
and started having an error message when I perform SVN Update
.
Z:\Projects\workB\trunk
Cannot relocate 'Z:\Projects\workB\trunk' as it is not the root of a working
copy; try relocating 'Z:\Projects\workB' instead
As this page suggests, I performed TortoiseSVN → Relocate
on Z:\Projects\workB
via the context menu. Then I get this message box.
It seems you are trying to relocate your working copy to a different path inside the same repository.
From: file:///Z:/repos/repoB
To: file:///Z:/repos/repoB
Is this normal? The both, From:
and To:
paths are the same although the warning message says a different path. I'm wondering if it's okay to press YES here.
This might be related: Problem trying to relocate WC to new repository
[Update]
To explain what I've done to cause the first error (Cannot relocate etc.), the current directory structure is like this.
Z:\repos\repoA
Z:\repos\repoB
Z:\Projects\workB
Z:\Projects\workB
is a checkout of the repository repoB
. And I created a svn:externals
on Z:\Projects\workB
with the following steps. ( I tried to import the whole trunk folder and its contents from repoA
to Z:\Projects\workB\trunk
. There is a reason I wanted to do this but it's going to be a long story. )
Right clicked on Z:\Projects\workB
and selected TortoiseSVN -> Properties
New -> Externals
Pressed New...
Typed "trunk" for Local path and "file:///Z:/repos/repoA/trunk" for URL and closed the setting windows.
Right clicked on Z:\Projects\workB
and selected SVN Commit...
and pressed OK to apply the externals definition. The commit went through.
To see if the external files get imported, I right clicked on Z:\Projects\workB
and selected SVN Update
And I got the first error that says try relocating.
Upvotes: 2
Views: 4044
Reputation: 107090
No, no, no!
Don't ever, ever use the file:///
URL -- especially with shared projects. It's bad, it's terrible, it's not a very good idea.
If nothing else, use the svnserve
process to start up a Subversion server. It's fairly simple, and no one will have direct access to your Subversion repository directory.
The file://
URL is good when playing around with Subversion, but should never be used with an actual project. Take a look at Subversion Edge by CollabNet if you want an open source Subversion server. This will allow you to serve your repository over http://
on a Windows server. Another popular one is VisualSVN Server. It's not open source, but a lot of people like the free version for setting up Subversion repositories.
You didn't give too much information. Do you realize in Subversion that you checkout the files you want to work on in a working directory? For example:
C:> cd C:\workdir
C:> svn co file:///Z:/Projects/workB/trunk workB-trunk
That will create a local copy on C:\workdir\workB-trunk. This is where you can play around with your files. note how your repository is in a different location than the files you checkout. I have a feeling that's why you're seeing the relocate stuff.
To use svn:externals
, you'd put the svn:externals
property on the directory of your project:
C> cd \workdir\workB-trunk
C> svn propset svn:externals "^/Z:/Projects/WorkC/trunk workC" .
C> svn update
This will place the most recent version of file:///Z:/Projects/WorkC/trunk
inside your working copy of workB-trunk. Commit the change, and everyone will get this when they checkout file://Z:/Projects/WorkC/trunk
.
By any chance... Do you happen to have a file:///Z:/repos/repoB/trunk? If so, you're attempting to checkout repoA into trunk where trunk is already a directory in repoB.
In that case, simply delete file:///Z:/repos/repoB/trunk
.
Upvotes: 4