Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151293634
D10993.id44064.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
8 KB
Referenced Files
None
Subscribers
None
D10993.id44064.diff
View Options
Index: en_US.ISO8859-1/articles/committers-guide/article.xml
===================================================================
--- en_US.ISO8859-1/articles/committers-guide/article.xml
+++ en_US.ISO8859-1/articles/committers-guide/article.xml
@@ -863,25 +863,9 @@
<sect3 xml:id="svn-daily-use-adding-and-removing">
<title>Adding and Removing Files</title>
- <note>
- <para>Before adding files, get a copy of <link
- xlink:href="https://people.FreeBSD.org/~peter/auto-props.txt">auto-props.txt</link>
- (there is also a <link
- xlink:href="https://people.FreeBSD.org/~beat/cvs2svn/auto-props.txt">
- ports tree specific version</link>) and add it to
- <filename>~/.subversion/config</filename> according to the
- instructions in the file. If you added something before
- reading this, use <command>svn rm --keep-local</command>
- for just added files, fix your config file and re-add them
- again. The initial config file is created when you first
- run a svn command, even something as simple as
- <command>svn help</command>.</para>
- </note>
-
- <para>Files are added to a
- <acronym>SVN</acronym> repository with <command>svn
- add</command>. To add a file named
- <emphasis>foo</emphasis>, edit it, then:</para>
+ <para>Files are added to a <acronym>SVN</acronym> repository
+ with <command>svn add</command>. To add an existing file
+ named <emphasis>foo</emphasis>, run:</para>
<screen>&prompt.user; <userinput>svn add <replaceable>foo</replaceable></userinput></screen>
@@ -896,32 +880,173 @@
<literal>$&os;$</literal> string.</para>
</note>
+ <para>If a file is missing a
+ <application>Subversion</application> property, it can be
+ easily added. See <xref
+ linkend="svn-daily-use-properties"/>.</para>
+
<para>Files can be removed with <command>svn
remove</command>:</para>
<screen>&prompt.user; <userinput>svn remove <replaceable>foo</replaceable></userinput></screen>
- <para>Subversion does not require deleting the file before
- using <command>svn rm</command>, and indeed complains if
- that happens.</para>
+ <note>
+ <para>Subversion does not require deleting the file before
+ using <command>svn rm</command>, and indeed complains if
+ that happens.</para>
+ </note>
+
+ <para>Use <command>svn mkdir</command> to combine the creation
+ of the directory and the adding of it:</para>
- <para>It is possible to add directories with
+ <screen>&prompt.user; <userinput>svn mkdir <replaceable>bar</replaceable></userinput></screen>
+
+ <para>It is also possible to add existing directories with
<command>svn add</command>:</para>
<screen>&prompt.user; <userinput>mkdir <replaceable>bar</replaceable></userinput>
&prompt.user; <userinput>svn add <replaceable>bar</replaceable></userinput></screen>
- <para>Although <command>svn mkdir</command> makes this easier
- by combining the creation of the directory and the adding of
- it:</para>
+ <para>Like files, directories are removed with <command>svn
+ rm</command>. There is no separate command specifically
+ for removing directories.</para>
- <screen>&prompt.user; <userinput>svn mkdir <replaceable>bar</replaceable></userinput></screen>
+ <screen>&prompt.user; <userinput>svn rm <replaceable>bar</replaceable></userinput></screen>
+ </sect3>
- <para>Like files, directories are removed with
- <command>svn rm</command>. There is no separate command
- specifically for removing directories.</para>
+ <sect3 xml:id="svn-daily-use-properties">
+ <title>Dealing with <application>Subversion</application>
+ Properties</title>
+
+ <para>In the base and ports
+ <application>Subversion</application> repositories,
+ properties are set automatically when a file is added. This
+ is achieved by using the <literal>svn:auto-props</literal>
+ property. No auto-props file needs to be used. The base
+ system <filename>auto-props.txt</filename> should not be
+ used. The current list of automatic properties can be seen
+ with:</para>
+
+ <screen>&prompt.user; <userinput>svn propget svn:auto-props https://svn.freebsd.org/ports</userinput>
+bsd.*.mk = svn:keywords=FreeBSD=%H
+distinfo* = fbsd:nokeywords=yes
+extrapatch-* = fbsd:nokeywords=yes
+extra-patch-*= fbsd:nokeywords=yes
+patch-* = fbsd:nokeywords=yes
+pkg-* = fbsd:nokeywords=yes
+Makefile* = svn:keywords=FreeBSD=%H
+* = svn:eol-style=native; svn:mime-type=text/plain
+
+&prompt.user; <userinput>svn propget svn:auto-props https://svn.freebsd.org/base</userinput>
+*.c = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain
+*.h = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain
+*.s = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain
+*.S = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain
+*.cc = svn:eol-style=native; svn:keywords=FreeBSD=%H; svn:mime-type=text/plain
+[...]</screen>
- <screen>&prompt.user; <userinput>svn rm <replaceable>bar</replaceable></userinput></screen>
+ <note>
+ <para>Some subdirectories may have additional
+ auto-properties, to find out which, the
+ <option>-R</option> argument for <command>svn
+ propget</command> can be used, for example:</para>
+
+ <screen>&prompt.user; <userinput>svn propget -R svn:auto-props https://svn.freebsd.org/ports/head/</userinput>
+https://svn.freebsd.org/ports/head/Mk - *.mk = svn:keywords=FreeBSD=%H
+
+https://svn.freebsd.org/ports/head/Mk/Scripts - *.sh = svn:keywords=FreeBSD=%H
+
+https://svn.freebsd.org/ports/head/misc/freebsd-release-manifests/files/MANIFESTS - *=svn:eol-style=native; fbsd:nokeywords=on; svn:mime-type=text/plain</screen>
+ </note>
+
+ <para>The Documentation repository does not use
+ <literal>svn:auto-props</literal>, when adding files, it may
+ be necessary to add properties manually.</para>
+
+ <tip>
+ <para>When adding a file, it is easy to see what properties
+ have been automatically added to it using <command>svn
+ proplist</command>. For example, in the ports
+ tree:</para>
+
+ <screen>&prompt.user; <userinput>svn add Makefile pkg-plist</userinput>
+A Makefile
+A pkg-plist
+&prompt.user; <userinput>svn proplist Makefile pkg-plist</userinput>
+Properties on 'Makefile':
+ svn:eol-style
+ svn:keywords
+ svn:mime-type
+Properties on 'pkg-plist':
+ fbsd:nokeywords
+ svn:eol-style
+ svn:mime-type</screen>
+
+ <para>It is also possible to get the value of all the
+ properties of a file using <command>svn proplist
+ -v</command>:</para>
+
+ <screen>&prompt.user; <userinput>svn proplist -v Makefile pkg-plist</userinput>
+Properties on 'Makefile':
+ svn:eol-style
+ native
+ svn:keywords
+ FreeBSD=%H
+ svn:mime-type
+ text/plain
+Properties on 'pkg-plist':
+ fbsd:nokeywords
+ yes
+ svn:eol-style
+ native
+ svn:mime-type
+ text/plain</screen>
+ </tip>
+
+ <example xml:id="svn-daily-props-ex1">
+ <title>Adding a Missing Subversion Property</title>
+
+ <para>It may happen that some file does not have the correct
+ properties and they need to be added or removed manually.
+ For example, if the file contains a
+ <literal>$FreeBSD$</literal> keyword and the
+ server complains about it:</para>
+
+ <screen>&prompt.user; <userinput>svn ci <replaceable>foo</replaceable></userinput>
+Adding <replaceable>foo</replaceable>
+Transmitting file data .done
+Committing transaction...
+svn: E165001: Commit failed (details follow):
+svn: E165001: Commit blocked by pre-commit hook (exit code 1) with output:
+Path "head/<replaceable>foo</replaceable>" is missing the svn:keywords property (or an fbsd:nokeywords override)
+== Pre-commit problem count: 1
+
+svn: E165001: Your commit message was left in a temporary file:
+svn: E165001: '/usr/ports/svn-commit.tmp'</screen>
+
+ <para>If the file contains a
+ <literal>$FreeBSD$</literal> keyword, then
+ use <command>svn propset</command> to add the required
+ property, and commit the file again:</para>
+
+ <screen>&prompt.user; <userinput>svn propset svn:keywords FreeBSD=%H <replaceable>foo</replaceable></userinput></screen>
+
+ <para>If the file does not contain the keyword, or it
+ contains a keyword, but it should not be modified, for
+ example, if the file is a patch. The
+ <literal>fbsd:nokeywords</literal> keyword need to be
+ added:</para>
+
+ <screen>&prompt.user; <userinput>svn propset fbsd:nokeywords yes <replaceable>foo</replaceable></userinput></screen>
+
+ <para>The file can then be committed:</para>
+
+ <screen>&prompt.user; <userinput>svn ci <replaceable>foo</replaceable></userinput>
+Adding <replaceable>foo</replaceable>
+Transmitting file data .done
+Committing transaction...
+Committed revision 85645.</screen>
+ </example>
</sect3>
<sect3 xml:id="svn-daily-use-copying-and-moving">
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 8, 9:30 AM (10 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31091633
Default Alt Text
D10993.id44064.diff (8 KB)
Attached To
Mode
D10993: Start updating the Subversion primer.
Attached
Detach File
Event Timeline
Log In to Comment