[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: Frank Kim <mtmusko_at_gmail.com>
Date: Tue, 29 Jan 2008 19:34:25 -0800

Hi Ryan,

These instructions have worked fantastically for all my repositories.
However with one of my repositories I am seeing this strange problem.

$ svn switch --relocate
svn+ssh://fkim@meetingkoreans.com/home/fkim/svn/mk/trunk
svn+ssh://fkim@meetingkoreans.com/home/fkim/svn/mk
svn: Relocate can only change the repository part of an URL

Do you know why I am getting this error? When I do an svn info it looks
correct the URL I am giving.

$ svn info CHANGELOG
Path: CHANGELOG
Name: CHANGELOG
URL: svn+ssh://fkim@meetingkoreans.com/home/fkim/svn/mk/trunk/CHANGELOG
Repository Root: svn+ssh://fkim@meetingkoreans.com/home/fkim/svn/mk
Repository UUID: 731bdbad-c103-0410-b98b-9f40b89f3851
Revision: 295
Node Kind: file
Schedule: normal
Last Changed Author: fkim
Last Changed Rev: 1
Last Changed Date: 2005-10-22 18:18:20 -0700 (Sat, 22 Oct 2005)
Text Last Updated: 2006-02-21 17:35:28 -0800 (Tue, 21 Feb 2006)
Checksum: 695c1c31d2a1fae54b5535c84935c81c

On Dec 18, 2007 6:41 PM, Ryan Schmidt <subversion-2007b_at_ryandesign.com>
wrote:

>
> On Dec 18, 2007, at 20:37, Ryan Schmidt wrote:
>
> > 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:
>
> I meant "working copy" not "repository" here, sorry.
>
> > $ 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.
>
> Forgot one thing: and now, you will want to go back again to each of
> your existing working copies, and switch them so that they still
> point at the trunk. For each working copy, now do this:
>
> $ cd working-copy
> $ svn switch file:///home/fkim/svn/aetv/trunk
>
> Or if the working copy used your svn+ssh URL, then
>
> $ svn switch svn+ssh://fkim@foo.com/home/fkim/svn/aetv/trunk
>
>
>
Received on 2008-01-30 04:42:33 CET

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.