The documentation incorrectly states that

% svn copy foo.c bar.c

and

% cp foo.c bar.c
% svn add bar.c

are equivalent. However, the first one keeps foo.c history and the second gets
rid of it.

Fix this and explain the difference.

Reviewed by:	brd, allanjude
Approved by:	allanjude
Differential Revision:	https://reviews.freebsd.org/D12678
This commit is contained in:
Romain Tartière 2017-10-17 17:43:45 +00:00
parent 51c7bed8dc
commit d0cf868b6d
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=51127

View file

@ -960,14 +960,15 @@ You need a Passphrase to protect your secret key.</screen>
<para>This command creates a copy of
<filename>foo.c</filename> named <filename>bar.c</filename>,
with the new file also under version control:</para>
with the new file also under version control and with the full
history of <filename>foo.c</filename>:</para>
<screen>&prompt.user; <userinput>svn copy <replaceable>foo.c</replaceable> <replaceable>bar.c</replaceable></userinput></screen>
<para>The example above is equivalent to:</para>
<screen>&prompt.user; <userinput>cp foo.c bar.c</userinput>
&prompt.user; <userinput>svn add bar.c</userinput></screen>
<para>This is usually preferred to copying the file with
<command>cp</command> and adding it to the repository with
<command>svn add</command> because this way the new file does not
inherit the original one's history.</para>
<para>To move and rename a file:</para>