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

Re: Switch issue

From: Rafael Garcia-Suarez <raphel.garcia-suarez_at_hexaflux.com>
Date: 2002-11-22 10:55:05 CET

andreas.koenig@anima.de (Andreas J. Koenig) wrote:
> I couldn't find a related problem in the issue tracker. Please let me
> know if I should file this as an issue:
>
> Starting with an empty repository "perl".
>
> % svn co http://localhost/svn/perl perl-wc
> k's password:
>
> Checked out revision 0.
> % cd perl-wc
> % mkdir trunk branches
> % svn add trunk branches
> A trunk
> A branches
> % svn commit -m 'Initial directory setup' .
> Adding branches
> Adding trunk
>
> Committed revision 1.
> % svn switch http://localhost/svn/perl/trunk
> subversion/libsvn_subr/io.c:649: (apr_err=2, src_err=0)
> svn: No such file or directory
> svn: svn_io_set_file_read_write: failed to set file '.svn/log' read-write
> zsh: exit 1 svn switch http://localhost/svn/perl/trunk

Not really an issue IMHO. Although I don't understand the error message.
switch is intended to switch a wc dir between branches. Here you're
trying to replace a wc that contains /perl/ by a wc that contains
/perl/trunk/. But /perl/trunk is not a branch of /perl/. You can't
create a branch in a subdirectory of the copied directory.

What you want apparently is more like
        mv perl-wc perl-wc.old
        mv perl-wc.old/trunk perl-wc
        rm -rf perl-wc.old

Then you can create branches with
        svn cp http://localhost/svn/perl/trunk http://localhost/svn/perl/branches/5.8.0 -m '...'
and switch your working copy
        cd perl-wc
        svn switch http://localhost/svn/perl/branches/5.8.0

The Book explains switch quite well. Think of it as an update
that moves between branches instead of moving between revision
(i.e through space instead of through time).

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 22 10:59:31 2002

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

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