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

Re: moving a directory in the repository and working copy?

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 29 Apr 2008 12:20:06 -0700

On Tue, Apr 29, 2008 at 9:23 AM, David A. Mellis <dam_at_mellis.org> wrote:

> Hi,
>
> Is it possible to move a directory in the repository and my working
> copy, without having to transmit its contents? I did a move between
> URLs and switched my working copy to the new URL, but if I move my
> working copy to match its new location in the repository, its parent
> directory gets confused.
>
> That is:
>
> svn mv http://svn/trunk/foo http://svn/releases/bar
> cd ~/trunk/foo
> svn switch http://svn/releases/bar
> cd ../..
> mv trunk/foo releases/bar
> cd releases
> svn update
>
> gives:
>
> svn: Failed to add directory 'bar': object of the same name already exists
>
> (at least, that's the basic idea; I actually used different paths).
>
> Is there a better way to do this? Or am I going to need to download
> the directory from the server with an update after doing the move in
> the repository?
>
>
If you do the move within the repository, yes, you will need to update to
bring it down. When you move the files using mv, subversion does not have
the knowledge of it (that is, it will not have the appropriate entry made in
the .svn folder).

Alternatively, you could actually move it within your workspace.

svn mv trunk/foo releases/bar

You will, however, need to commit to the repository.

Regards,
-Hari
Received on 2008-04-29 21:20:43 CEST

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.