You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by x nooby <xn...@yahoo.com> on 2005/09/23 18:44:21 UTC

How to move files from within one URL to within another?

I need to move the files from one URL to another URL

I have a bunch of directories and files located at
this URL:

   svn://myserver.myhost.com/svnrepo/trunk/myclient


I want to move the files to this URL:

   svn://myserver.myhost.com/svnrepo/myclient/trunk


When I do this command:

   svn move \
   svn://myserver.myhost.com/svnrepo/trunk/myclient/*
\
   svn://myserver.myhost.com/svnrepo/myclient/trunk/

The error I get is:

   svn: Path
'svn://myserver.myhost.com/svnrepo/trunk/myclient/*' 
   does not exist in revision 1269


I *can* move the entire direcotry, like this:

   svn move \
   svn://myserver.myhost.com/svnrepo/trunk/myclient/ \
   svn://myserver.myhost.com/svnrepo/myclient/trunk/

But that results in myclient going here:

  
svn://myserver.myhost.com/svnrepo/myclient/trunk/myclient

Is there a way to move the contents of a URL to
another URL?  I thought it should work like copying
the files from one directory to another on a
hard-disk, but it doesn't like the "*".

thanks!


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: How to move files from within one URL to within another?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 23, 2005, at 21:25, x nooby wrote:

> If I have users that checked out the repository, and
> they have local edits - do they just need to do a "svn
> switch" to the new URL?
>
> I don't want them to lose their local work, if
> possible.

Yes, that's all they should need to do.

svn switch \
svn://myserver.myhost.com/svnrepo/trunk/myclient \
svn://myserver.myhost.com/svnrepo/myclient/trunk



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

Re: How to move files from within one URL to within another?

Posted by x nooby <xn...@yahoo.com>.
> wouldn't do either). So, to do what you want, first
> delete trunk in  
> the repository, then the copy will work.

Hi Ryan,

This worked great.

If I have users that checked out the repository, and
they have local edits - do they just need to do a "svn
switch" to the new URL?

I don't want them to lose their local work, if
possible.

thanks!



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Re: How to move files from within one URL to within another?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Sep 23, 2005, at 20:44, x nooby wrote:

> I need to move the files from one URL to another URL
>
> I have a bunch of directories and files located at
> this URL:
>
>    svn://myserver.myhost.com/svnrepo/trunk/myclient
>
>
> I want to move the files to this URL:
>
>    svn://myserver.myhost.com/svnrepo/myclient/trunk
>
>
> When I do this command:
>
>    svn move \
>    svn://myserver.myhost.com/svnrepo/trunk/myclient/*
> \
>    svn://myserver.myhost.com/svnrepo/myclient/trunk/
>
> The error I get is:
>
>    svn: Path
> 'svn://myserver.myhost.com/svnrepo/trunk/myclient/*'
>    does not exist in revision 1269
>
>
> I *can* move the entire direcotry, like this:
>
>    svn move \
>    svn://myserver.myhost.com/svnrepo/trunk/myclient/ \
>    svn://myserver.myhost.com/svnrepo/myclient/trunk/
>
> But that results in myclient going here:
>
>
> svn://myserver.myhost.com/svnrepo/myclient/trunk/myclient
>
> Is there a way to move the contents of a URL to
> another URL?  I thought it should work like copying
> the files from one directory to another on a
> hard-disk, but it doesn't like the "*".

You're right, Subversion doesn't do the *. When using normal cp on  
the shell, the * is expanded by the shell, by the way, and the result  
of the expansion is sent to the cp program; the cp program itself  
does not handle the *.

In other respects, though, using Subversion to copy something should  
be similar to using the shell to copy something.

In your case, you have already created /myclient/trunk/ in the  
repository. Therefore, your directory is copied into that directory,  
rather than replacing the directory (which your standard Unix shell  
wouldn't do either). So, to do what you want, first delete trunk in  
the repository, then the copy will work.

svn rm -m "Removing empty trunk" \
svn://myserver.myhost.com/svnrepo/myclient/trunk

svn mv -m "Renaming trunk/myclient to myclient/trunk" \
svn://myserver.myhost.com/svnrepo/trunk/myclient \
svn://myserver.myhost.com/svnrepo/myclient/trunk



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