Add and unify IDs in SVN Primer. Add note about $FreeBSD$ string for

adding new files.  Rewrite confusing svn rm explanation.  Add
explanation to svn cp.

Reviewed by:	remko, jilles (both only for $FreeBSD$ note)
This commit is contained in:
Warren Block 2013-06-30 21:24:06 +00:00
parent a25bf53760
commit eea02c6dfa
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=42096

View file

@ -85,7 +85,7 @@
Root</emphasis></entry> Root</emphasis></entry>
<entry><literal>svn+ssh://</literal><hostid <entry><literal>svn+ssh://</literal><hostid
role="fqdn">svn.FreeBSD.org</hostid><filename>/base</filename> role="fqdn">svn.FreeBSD.org</hostid><filename>/base</filename>
(see also <xref linkend="subversion-primer"/>).</entry> (see also <xref linkend="svn-getting-started-base-layout"/>).</entry>
</row> </row>
<row> <row>
@ -93,7 +93,7 @@
Root</emphasis></entry> Root</emphasis></entry>
<entry><literal>svn+ssh://</literal><hostid <entry><literal>svn+ssh://</literal><hostid
role="fqdn">svn.FreeBSD.org</hostid><filename>/doc</filename> role="fqdn">svn.FreeBSD.org</hostid><filename>/doc</filename>
(see also <xref linkend="subversion-primer"/>).</entry> (see also <xref linkend="svn-getting-started-doc-layout"/>).</entry>
</row> </row>
<row> <row>
@ -101,7 +101,7 @@
Root</emphasis></entry> Root</emphasis></entry>
<entry><literal>svn+ssh://</literal><hostid <entry><literal>svn+ssh://</literal><hostid
role="fqdn">svn.FreeBSD.org</hostid><filename>/ports</filename> role="fqdn">svn.FreeBSD.org</hostid><filename>/ports</filename>
(see also <xref linkend="subversion-primer"/>).</entry> (see also <xref linkend="svn-getting-started-ports-layout"/>).</entry>
</row> </row>
<row> <row>
@ -389,7 +389,7 @@
<para>There are a few ways to obtain a working copy of the tree <para>There are a few ways to obtain a working copy of the tree
from Subversion. This section will explain them.</para> from Subversion. This section will explain them.</para>
<sect3> <sect3 id="svn-getting-started-direct-checkout">
<title>Direct Checkout</title> <title>Direct Checkout</title>
<para>The first is to check out directly from the main <para>The first is to check out directly from the main
@ -456,7 +456,7 @@
</note> </note>
</sect3> </sect3>
<sect3> <sect3 id="svn-getting-started-checkout-from-a-mirror">
<title>Checkout from a Mirror</title> <title>Checkout from a Mirror</title>
<para>Check out a working copy from a mirror by <para>Check out a working copy from a mirror by
@ -482,7 +482,7 @@
information on how to set one up.</para> information on how to set one up.</para>
</sect3> </sect3>
<sect3 id="subversion-primer-base-layout"> <sect3 id="svn-getting-started-base-layout">
<title><literal>RELENG_*</literal> Branches and General <title><literal>RELENG_*</literal> Branches and General
Layout</title> Layout</title>
@ -542,7 +542,7 @@
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3> <sect3 id="svn-getting-started-doc-layout">
<title>&os; Documentation Project Branches and <title>&os; Documentation Project Branches and
Layout</title> Layout</title>
@ -583,7 +583,7 @@
</itemizedlist> </itemizedlist>
</sect3> </sect3>
<sect3> <sect3 id="svn-getting-started-ports-layout">
<title>&os; Ports Tree Branches and Layout</title> <title>&os; Ports Tree Branches and Layout</title>
<para>In <literal>svn+ssh://svn.freebsd.org/ports</literal>, <para>In <literal>svn+ssh://svn.freebsd.org/ports</literal>,
@ -626,7 +626,7 @@
<para>This section will explain how to perform common day-to-day <para>This section will explain how to perform common day-to-day
operations with Subversion.</para> operations with Subversion.</para>
<sect3> <sect3 id="svn-daily-use-help">
<title>Help</title> <title>Help</title>
<para><acronym>SVN</acronym> <para><acronym>SVN</acronym>
@ -640,7 +640,7 @@
Book</ulink>.</para> Book</ulink>.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-checkout">
<title>Checkout</title> <title>Checkout</title>
<para>As seen earlier, to check out the &os; head <para>As seen earlier, to check out the &os; head
@ -703,7 +703,7 @@
</note> </note>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-anonymous-checkout">
<title>Anonymous Checkout</title> <title>Anonymous Checkout</title>
<para>It is possible to anonymously check out the &os; <para>It is possible to anonymously check out the &os;
@ -719,7 +719,7 @@
mirror sites</ulink>.</para> mirror sites</ulink>.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-updating-the-tree">
<title>Updating the Tree</title> <title>Updating the Tree</title>
<para>To update a working copy to either the latest revision, <para>To update a working copy to either the latest revision,
@ -729,7 +729,7 @@
&prompt.user; <userinput>svn update -<replaceable>r12345</replaceable></userinput></screen> &prompt.user; <userinput>svn update -<replaceable>r12345</replaceable></userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-status">
<title>Status</title> <title>Status</title>
<para>To view the local changes that have been made to the <para>To view the local changes that have been made to the
@ -743,7 +743,7 @@
<screen>&prompt.user; <userinput>svn status --show-updates</userinput></screen> <screen>&prompt.user; <userinput>svn status --show-updates</userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-editing-and-committing">
<title>Editing and Committing</title> <title>Editing and Committing</title>
<para>Unlike Perforce, <para>Unlike Perforce,
@ -772,7 +772,7 @@
</userinput></screen> </userinput></screen>
</sect3> </sect3>
<sect3 id="subversion-primer-add-remove"> <sect3 id="svn-daily-use-adding-and-removing">
<title>Adding and Removing Files</title> <title>Adding and Removing Files</title>
<note> <note>
@ -798,13 +798,24 @@
<screen>&prompt.user; <userinput>svn add <replaceable>foo</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn add <replaceable>foo</replaceable></userinput></screen>
<note>
<para>Most new source files should include a
<literal>&dollar;FreeBSD&dollar;</literal> string in the
new file. On commit, <command>svn</command> will expand
the <literal>&dollar;FreeBSD&dollar;</literal> string,
adding the file path, revision number, date and time of
commit, and the username of the committer. Files which
cannot be modified may be committed without the
<literal>&dollar;FreeBSD&dollar;</literal> string.</para>
</note>
<para>Files can be removed with <command>svn <para>Files can be removed with <command>svn
remove</command>:</para> remove</command>:</para>
<screen>&prompt.user; <userinput>svn remove <replaceable>foo</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn remove <replaceable>foo</replaceable></userinput></screen>
<para>Subversion does not require <command>rm</command>ing the <para>Subversion does not require deleting the
file before <command>svn rm</command>ing it, and indeed file before using <command>svn rm</command>, and indeed
complains if that happens.</para> complains if that happens.</para>
<para>It is possible to add directories with <command>svn <para>It is possible to add directories with <command>svn
@ -829,15 +840,20 @@
<screen>&prompt.user; <userinput>svn rm <replaceable>bar</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn rm <replaceable>bar</replaceable></userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-copying-and-moving">
<title>Copying and Moving Files</title> <title>Copying and Moving Files</title>
<para>The following (obviously) creates a copy of <para>The command creates a copy of
<filename>foo.c</filename>, named <filename>foo.c</filename>, named
<filename>bar.c</filename>:</para> <filename>bar.c</filename>, with the new file also under version control:</para>
<screen>&prompt.user; <userinput>svn copy <replaceable>foo.c</replaceable> <replaceable>bar.c</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn copy <replaceable>foo.c</replaceable> <replaceable>bar.c</replaceable></userinput></screen>
<para><command>svn cp</command> is equivalent to:</para>
<screen>&prompt.user; <userinput>cp foo.c bar.c</userinput>
&prompt.user; <userinput>svn add bar.c</userinput></screen>
<para>To move and rename a file:</para> <para>To move and rename a file:</para>
<screen>&prompt.user; <userinput>svn move <replaceable>foo.c</replaceable> <replaceable>bar.c</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn move <replaceable>foo.c</replaceable> <replaceable>bar.c</replaceable></userinput></screen>
@ -848,7 +864,7 @@
&prompt.user; <userinput>svn remove <replaceable>foo.c</replaceable></userinput></screen> &prompt.user; <userinput>svn remove <replaceable>foo.c</replaceable></userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-log-and-annotate">
<title>Log and Annotate</title> <title>Log and Annotate</title>
<para><command>svn log</command> will show all the <para><command>svn log</command> will show all the
@ -865,7 +881,7 @@
but output format.</para> but output format.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-diffs">
<title>Diffs</title> <title>Diffs</title>
<para><command>svn diff</command> displays changes to the <para><command>svn diff</command> displays changes to the
@ -888,7 +904,7 @@
<screen>&prompt.user; <userinput>svn diff -c179454 .</userinput></screen> <screen>&prompt.user; <userinput>svn diff -c179454 .</userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-reverting">
<title>Reverting</title> <title>Reverting</title>
<para>Local changes (including additions and deletions) can be <para>Local changes (including additions and deletions) can be
@ -898,7 +914,7 @@
the original version.</para> the original version.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-daily-use-conflicts">
<title>Conflicts</title> <title>Conflicts</title>
<para>If a <command>svn update</command> resulted in a merge <para>If a <command>svn update</command> resulted in a merge
@ -950,7 +966,7 @@
<sect2> <sect2>
<title>Advanced Use</title> <title>Advanced Use</title>
<sect3> <sect3 id="svn-advanced-use-sparse-checkouts">
<title>Sparse Checkouts</title> <title>Sparse Checkouts</title>
<para>The equivalent to <command>cvs checkout -l</command>, <para>The equivalent to <command>cvs checkout -l</command>,
@ -1019,7 +1035,7 @@
<screen>&prompt.user; <userinput>svn update --set-depth=infinity <replaceable>head</replaceable></userinput></screen> <screen>&prompt.user; <userinput>svn update --set-depth=infinity <replaceable>head</replaceable></userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-direct-operation">
<title>Direct Operation</title> <title>Direct Operation</title>
<para>Certain operations can be performed directly on the <para>Certain operations can be performed directly on the
@ -1069,7 +1085,7 @@
&prompt.user; <userinput>svn commit stable/8</userinput></screen> &prompt.user; <userinput>svn commit stable/8</userinput></screen>
</sect3> </sect3>
<sect3 id="subversion-primer-merge"> <sect3 id="svn-advanced-use-merging">
<title>Merging with <acronym>SVN</acronym></title> <title>Merging with <acronym>SVN</acronym></title>
<para>This section deals with merging code from one branch to <para>This section deals with merging code from one branch to
@ -1385,12 +1401,12 @@ $target - head/$source:$P,$Q,$R</screen>
in r238987 is to be merged from CURRENT to 9-STABLE. in r238987 is to be merged from CURRENT to 9-STABLE.
The file resides in <filename The file resides in <filename
class="directory">head/share/man/man4</filename> and class="directory">head/share/man/man4</filename> and
according to <xref linkend="subversion-primer-merge"/> according to <xref linkend="svn-advanced-use-merging"/>
this is also where to do the merge. Note that in this this is also where to do the merge. Note that in this
example all paths are relative to the top of the svn example all paths are relative to the top of the svn
repository. For more information on the directory repository. For more information on the directory
layout, see layout, see
<xref linkend="subversion-primer-base-layout"/>.</para> <xref linkend="svn-getting-started-base-layout"/>.</para>
<para>The first step is to inspect the existing <para>The first step is to inspect the existing
mergeinfo.</para> mergeinfo.</para>
@ -1467,7 +1483,7 @@ U stable/9/share/man/man4/netmap.4
</sect4> </sect4>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-vendor-imports">
<title>Vendor Imports with <acronym>SVN</acronym></title> <title>Vendor Imports with <acronym>SVN</acronym></title>
<important> <important>
@ -1781,7 +1797,7 @@ U stable/9/share/man/man4/netmap.4
</sect4> </sect4>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-reverting-a-commit">
<title>Reverting a Commit</title> <title>Reverting a Commit</title>
<para>Reverting a commit to a previous version is fairly <para>Reverting a commit to a previous version is fairly
@ -1824,7 +1840,7 @@ U stable/9/share/man/man4/netmap.4
cause history to be lost.</para> cause history to be lost.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-fixing-mistakes">
<title>Fixing Mistakes</title> <title>Fixing Mistakes</title>
<para>While we can do surgery in an emergency, do not plan on <para>While we can do surgery in an emergency, do not plan on
@ -1850,7 +1866,7 @@ U stable/9/share/man/man4/netmap.4
This is a waste.</para> This is a waste.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-setting-up-svnsync">
<title>Setting up a <application>svnsync</application> <title>Setting up a <application>svnsync</application>
Mirror</title> Mirror</title>
@ -1895,7 +1911,7 @@ U stable/9/share/man/man4/netmap.4
<para>Use <literal>propset</literal> to change things.</para> <para>Use <literal>propset</literal> to change things.</para>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-committing-high-ascii-data">
<title>Committing High-<acronym>ASCII</acronym> Data</title> <title>Committing High-<acronym>ASCII</acronym> Data</title>
<para>Files that have high-<acronym>ASCII</acronym> bits are <para>Files that have high-<acronym>ASCII</acronym> bits are
@ -1913,7 +1929,7 @@ U stable/9/share/man/man4/netmap.4
<screen>&prompt.user; <userinput>svn propset fbsd:notbinary yes foo.data</userinput></screen> <screen>&prompt.user; <userinput>svn propset fbsd:notbinary yes foo.data</userinput></screen>
</sect3> </sect3>
<sect3> <sect3 id="svn-advanced-use-maintaining-a-project-branch">
<title>Maintaining a Project Branch</title> <title>Maintaining a Project Branch</title>
<para>A project branch is one that is synced to head (or <para>A project branch is one that is synced to head (or
@ -2034,7 +2050,7 @@ ControlPersist yes</screen>
<command>svn:keywords</command> property will be <command>svn:keywords</command> property will be
rejected when attempting to commit them to the rejected when attempting to commit them to the
repository. Be sure to read repository. Be sure to read
<xref linkend="subversion-primer-add-remove"/> regarding <xref linkend="svn-daily-use-adding-and-removing"/> regarding
adding and removing files, in addition to verifying that adding and removing files, in addition to verifying that
<filename>~/.subversion/config</filename> contains the <filename>~/.subversion/config</filename> contains the
necessary &quot;auto-props&quot; entries from necessary &quot;auto-props&quot; entries from