You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "David A. Mellis" <da...@mellis.org> on 2008/04/29 16:23:30 UTC

moving a directory in the repository and working copy?

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?

David

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

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

Posted by Hari Kodungallur <hk...@gmail.com>.
On Tue, Apr 29, 2008 at 9:23 AM, David A. Mellis <da...@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