[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn copy not working but svn co does

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-12-19 03:37:52 CET

On Dec 18, 2007, at 20:28, Frank Kim wrote:

>> Could it be that /home/fkim/svn/aetv/trunk is actually your
>> repository, and not /home/fkim/svn/aetv? What is the contents of the
>> directory /home/fkim/svn/aetv on the server's hard drive? Is there a
>> directory /home/fkim/svn/aetv/trunk on the server's hard drive and if
>> so what is its contents?
>
> Thanks for your reply. Here are the contents of /home/fkim/svn/aetv:
>
> [pizarro ~/svn/aetv]$ ls
> branches/ tags/ trunk/
>
> [pizarro ~/svn/aetv]$ ls trunk/
> README.txt conf/ dav/ db/ format hooks/ locks/
>
> [pizarro ~/svn/aetv]$ ls branches/
> README.txt conf/ dav/ db/ format hooks/ locks/
>
> I think I am doing the right thing. [snip]

Well you're not. :) You have created two separate repositories, one
called trunk and one called branches (and probably a third called
tags). That won't work. You can't "svn copy" between repositories,
only within a single repository.

Let's clean up this mess so that you have only a single repository.
Before we begin, please check whether there is anything in your
branches and tags repositories:

$ svn ls file:///home/fkim/svn/aetv/branches
$ svn ls file:///home/fkim/svn/aetv/tags

Assuming this shows the branches and tags repositories are empty,
then let's proceed to get rid of them and make the trunk repository
your only repository.

$ cd /home/fkim/svn/aetv
$ mv trunk/* .
$ rm -rf trunk branches tags

Now go to every working copy that you already have. We need to inform
each working copy that the location of the repository has changed.
For each working copy, do this:

$ cd working-copy
$ svn switch --relocate \
file:///home/fkim/svn/aetv/trunk \
file:///home/fkim/svn/aetv

Or if the repository used your svn+ssh URL, then:

$ svn switch --relocate \
svn+ssh://fkim@foo.com/home/fkim/svn/aetv/trunk \
svn+ssh://fkim@foo.com/home/fkim/svn/aetv

So now you've fixed your repository, and you've fixed all working
copies that point to it. Now you can begin reorganizing. In
particular, you will now want to create the trunk, branches and tags
directories in your repository. Go to a clean working copy of this
repository, or check out a new one, and make the three directories:

$ svn checkout file:///home/fkim/svn/aetv reorg
$ cd reorg
$ svn mkdir trunk branches tags

Now for every item that is not the trunk, branches or tags directory,
move it into the trunk directory:

$ svn mv foo trunk

(for every "foo")

Now commit the change.

$ svn ci -m "Making trunk, branches and tags directories and moving
everything into the trunk"

NOW you can make branches or tags by copying from the trunk.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 19 03:38:20 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.