You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jim Thompson <ji...@doit.wisc.edu> on 2007/08/10 00:44:13 UTC
svn cp (newbie question)
On linux...
[jft@coyote admin]$ svn --version
svn, version 1.4.3 (r23084)
compiled Feb 20 2007, 11:46:52
According to http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.copy.html
"svn copy — Copy a file or directory in a working copy or in the
repository."
Trying some command line stuff ...
OK - this looks fairly normal:
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1
branches/
tags/
trunk/
And we only have one file in trunk...
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
[jft@coyote admin]$
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/branches
[jft@coyote admin]$
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk
hello.c
[jft@coyote admin]$
Here's a first attempt to copy that file from trunk to tags (file name
included in destination):
[jft@coyote admin]$ svn cp
file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test/hello.c
-m "copy file to test tag"
svn: Path 'tags/test' not present
Verifying that we still have nothing in the tags directory:
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
[jft@coyote admin]$
OK, let's try again (file name not included in destination):
[jft@coyote admin]$ svn cp
file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test -m "copy
file to test tag"
Committed revision 25.
It looks like it worked, but ....
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
test
[jft@coyote admin]$
[jft@coyote admin]$ svn list
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test
test
[jft@coyote admin]$
Huh? test inside test?? What is that? It's the file, which has been
renamed...
[jft@coyote admin]$ svn cat
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test
/*
Documentation about this file follows...
File last changed on $Date: 2007-07-18 16:18:28 -0500 (Wed, 18 Jul 2007) $
by $Author: jft $, in revision $Rev: 17 $.
It can be found at $HeadURL: file:///home/jft/my_repository/trunk/hello.c $
$Id: hello.c 17 2007-07-18 21:18:28Z jft $
*/
- - -
Not what I expected - thought I'd find the file with its original name -
hello.c.
Suggestions?
Thanks,
Jim
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cp (newbie question)
Posted by Rainer Sokoll <R....@intershop.de>.
On Fri, Aug 10, 2007 at 12:55:48PM +0200, Clemens wrote:
> you are -- of course -- right. But as the OP is new to svn and asked
> stright for copying of a file (and not for tagging),
And to make the confusion complete ( ;-)): in subversion, there is no
thing like tags (or branches) - only copies.
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cp (newbie question)
Posted by Clemens <cl...@thalesgroup.com>.
Hallo Michael,
Michael J Gruber wrote:
(...)
>> svn mkdir file:///<your path here>/tags/test
>> svn cp file:///<your path here>/trunk/hello.c \
>> file:///<your path here>/tags/test/hello.c
>
> Or, since you have ony 1 file in trunk:
>
> svn cp file:///<your_path_here>/trunk file:///<your_path_here>/tags/test
>
> This is how you create tags and branches.
you are -- of course -- right. But as the OP is new to svn and asked
stright for copying of a file (and not for tagging), I wanted to answer
his question directly thereby showing him, that in svn things should be
handled as in a filesystem :-)
Ciao,
Clemens.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cp (newbie question)
Posted by Michael J Gruber <mi...@fastmail.fm>.
Clemens venit, vidit, dixit 10.08.2007 07:41:
> Hello Jim,
>
> Jim Thompson wrote:
>> Jim Thompson wrote:
>>> On linux...
>>>
>
> (...)
>
>>> Here's a first attempt to copy that file from trunk to tags (file name
>>> included in destination):
>>>
>>> [jft@coyote admin]$ svn cp
>>> file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
>>> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test/hello.c
>>> -m "copy file to test tag"
>>> svn: Path 'tags/test' not present
>
> hmmm ... you should view it right like a filesystem here. Look this:
>
> mkdir trunk
> echo hello >> trunk/hello.txt
> mkdir tags
> cp trunk/hello.txt tags/test/hello.txt
>
> Do you really expect this to work? A copy does not create lacking
> directories. Subversion behaves exactly similar. To get it to work you
> have to:
>
> svn mkdir file:///<your path here>/tags/test
> svn cp file:///<your path here>/trunk/hello.c \
> file:///<your path here>/tags/test/hello.c
Or, since you have ony 1 file in trunk:
svn cp file:///<your_path_here>/trunk file:///<your_path_here>/tags/test
This is how you create tags and branches.
Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cp (newbie question)
Posted by Clemens <cl...@thalesgroup.com>.
Hello Jim,
Jim Thompson wrote:
> Jim Thompson wrote:
>> On linux...
>>
(...)
>> Here's a first attempt to copy that file from trunk to tags (file name
>> included in destination):
>>
>> [jft@coyote admin]$ svn cp
>> file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
>> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test/hello.c
>> -m "copy file to test tag"
>> svn: Path 'tags/test' not present
hmmm ... you should view it right like a filesystem here. Look this:
mkdir trunk
echo hello >> trunk/hello.txt
mkdir tags
cp trunk/hello.txt tags/test/hello.txt
Do you really expect this to work? A copy does not create lacking
directories. Subversion behaves exactly similar. To get it to work you
have to:
svn mkdir file:///<your path here>/tags/test
svn cp file:///<your path here>/trunk/hello.c \
file:///<your path here>/tags/test/hello.c
just right the same as you would do using a filesystem.
(...)
HTH,
Clemens.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Re: svn cp (newbie question)
Posted by Jim Thompson <ji...@doit.wisc.edu>.
Jim Thompson wrote:
> On linux...
>
> [jft@coyote admin]$ svn --version
> svn, version 1.4.3 (r23084)
> compiled Feb 20 2007, 11:46:52
>
> According to
> http://svnbook.red-bean.com/nightly/en/svn.ref.svn.c.copy.html
> "svn copy — Copy a file or directory in a working copy or in the
> repository."
>
> Trying some command line stuff ...
>
> OK - this looks fairly normal:
>
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1
> branches/
> tags/
> trunk/
>
> And we only have one file in trunk...
>
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
> [jft@coyote admin]$
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/branches
> [jft@coyote admin]$
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk
> hello.c
> [jft@coyote admin]$
>
>
> Here's a first attempt to copy that file from trunk to tags (file name
> included in destination):
>
> [jft@coyote admin]$ svn cp
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test/hello.c
> -m "copy file to test tag"
> svn: Path 'tags/test' not present
>
>
> Verifying that we still have nothing in the tags directory:
>
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
> [jft@coyote admin]$
>
>
> OK, let's try again (file name not included in destination):
>
> [jft@coyote admin]$ svn cp
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/trunk/hello.c
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test -m
> "copy file to test tag"
>
> Committed revision 25.
>
>
> It looks like it worked, but ....
>
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags
> test
> [jft@coyote admin]$
> [jft@coyote admin]$ svn list
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test
> test
> [jft@coyote admin]$
>
> Huh? test inside test?? What is that? It's the file, which has been
> renamed...
>
Ooops! Hit send too soon... Actually that's the *first* test... the
test/test shows this:
[jft@coyote admin]$ svn cat
file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test/test
svn: Failure opening '/my/up/portlets/portlet1/tags/test/test'
svn: '/my/up/portlets/portlet1/tags/test' is not a directory in
filesystem '/home/jft/my_newrepos/db'
[jft@coyote admin]$
> [jft@coyote admin]$ svn cat
> file:///home/jft/my_newrepos/my/up/portlets/portlet1/tags/test
> /*
>
> Documentation about this file follows...
> File last changed on $Date: 2007-07-18 16:18:28 -0500 (Wed, 18 Jul
> 2007) $
> by $Author: jft $, in revision $Rev: 17 $.
> It can be found at $HeadURL:
> file:///home/jft/my_repository/trunk/hello.c $
> $Id: hello.c 17 2007-07-18 21:18:28Z jft $
>
> */
>
> - - -
>
> Not what I expected - thought I'd find the file with its original name
> - hello.c.
>
> Suggestions?
>
> Thanks,
> Jim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org