<?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>svn propset (pset, ps)</title> <link rel="stylesheet" type="text/css" href="styles.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /> <style type="text/css"> body { background-image: url('images/draft.png'); background-repeat: no-repeat; background-position: top left; /* The following properties make the watermark "fixed" on the page. */ /* I think that's just a bit too distracting for the reader... */ /* background-attachment: fixed; */ /* background-position: center center; */ }</style> <link rel="home" href="index.html" title="Version Control with Subversion [DRAFT]" /> <link rel="up" href="svn.ref.svn.html" title="svn Reference—Subversion Command-Line Client" /> <link rel="prev" href="svn.ref.svn.c.proplist.html" title="svn proplist (plist, pl)" /> <link rel="next" href="svn.ref.svn.c.relocate.html" title="svn relocate" /> </head> <body> <div xmlns="" id="vcws-version-notice"> <p>This text is a work in progress—highly subject to change—and may not accurately describe any released version of the Apache™ Subversion® software. Bookmarking or otherwise referring others to this page is probably not such a smart idea. Please visit <a href="http://www.svnbook.com/">http://www.svnbook.com/</a> for stable versions of this book.</p> </div> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">svn propset (pset, ps)</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="svn.ref.svn.c.proplist.html">Prev</a> </td> <th width="60%" align="center">svn Reference—Subversion Command-Line Client</th> <td width="20%" align="right"> <a accesskey="n" href="svn.ref.svn.c.relocate.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="svn.ref.svn.c.propset"></a> <div class="titlepage"></div> <a id="idm12611" class="indexterm"></a> <div class="refnamediv"> <h2>Name</h2> <p>svn propset (pset, ps) — Set <em class="replaceable"><code>PROPNAME</code></em> to <em class="replaceable"><code>PROPVAL</code></em> on files, directories, or revisions.</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <p> <code class="literal">svn propset PROPNAME [PROPVAL | -F VALFILE] PATH...</code> </p> <p> <code class="literal">svn propset PROPNAME --revprop -r REV [PROPVAL | -F VALFILE] [TARGET]</code> </p> </div> <div class="refsect1"> <a id="idm12625"></a> <h2>Description</h2> <p>Set <em class="replaceable"><code>PROPNAME</code></em> to <em class="replaceable"><code>PROPVAL</code></em> on files, directories, or revisions. The first example creates a versioned, local property change in the working copy, and the second creates an unversioned, remote property change on a repository revision (<em class="replaceable"><code>TARGET</code></em> determines only which repository to access).</p> <div class="tip" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Tip"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Tip]" src="images/tip.png" /> </td> <th align="left">Tip</th> </tr> <tr> <td align="left" valign="top"> <p>Subversion has a number of <span class="quote">“<span class="quote">special</span>”</span> properties that affect its behavior. See <a class="xref" href="svn.advanced.props.html#svn.advanced.props.ref" title="Subversion's Reserved Properties">the section called “Subversion's Reserved Properties”</a> for details.</p> </td> </tr> </table> </div> </div> <div class="refsect1"> <a id="idm12635"></a> <h2>Options</h2> <div class="informalexample"> <pre class="screen"> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.changelist"><code class="option">--changelist</code> (<code class="option">--cl</code>) <em class="replaceable"><code>ARG</code></em></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.depth"><code class="option">--depth</code> <em class="replaceable"><code>ARG</code></em></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.encoding"><code class="option">--encoding</code> <em class="replaceable"><code>ENC</code></em></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.file"><code class="option">--file</code> (<code class="option">-F</code>) <em class="replaceable"><code>FILENAME</code></em></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.force"><code class="option">--force</code></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.quiet"><code class="option">--quiet</code> (<code class="option">-q</code>)</a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.recursive"><code class="option">--recursive</code> (<code class="option">-R</code>)</a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.revision"><code class="option">--revision</code> (<code class="option">-r</code>) <em class="replaceable"><code>REV</code></em></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.revprop"><code class="option">--revprop</code></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.targets"><code class="option">--targets</code> <em class="replaceable"><code>FILENAME</code></em></a> </pre> </div> </div> <div class="refsect1"> <a id="idm12649"></a> <h2>Examples</h2> <p>Set the MIME type for a file:</p> <div class="informalexample"> <pre class="screen"> $ svn propset svn:mime-type image/jpeg foo.jpg property 'svn:mime-type' set on 'foo.jpg' </pre> </div> <p>On a Unix system, if you want a file to have the executable permission set:</p> <div class="informalexample"> <pre class="screen"> $ svn propset svn:executable ON somescript property 'svn:executable' set on 'somescript' </pre> </div> <p>Perhaps you have an internal policy to set certain properties for the benefit of your coworkers:</p> <div class="informalexample"> <pre class="screen"> $ svn propset owner sally foo.c property 'owner' set on 'foo.c' </pre> </div> <p>If you made a mistake in a log message for a particular revision and want to change it, use <code class="option">--revprop</code> and set <code class="literal">svn:log</code> to the new log message:</p> <div class="informalexample"> <pre class="screen"> $ svn propset --revprop -r 25 svn:log "Journaled about trip to New York." property 'svn:log' set on repository revision '25' </pre> </div> <p>Or, if you don't have a working copy, you can provide a URL:</p> <div class="informalexample"> <pre class="screen"> $ svn propset --revprop -r 26 svn:log "Document nap." \ http://svn.red-bean.com/repos property 'svn:log' set on repository revision '25' </pre> </div> <p>Lastly, you can tell <span class="command"><strong>propset</strong></span> to take its input from a file. You could even use this to set the contents of a property to something binary:</p> <div class="informalexample"> <pre class="screen"> $ svn propset owner-pic -F sally.jpg moo.c property 'owner-pic' set on 'moo.c' </pre> </div> <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"> <table border="0" summary="Note"> <tr> <td rowspan="2" align="center" valign="top" width="25"> <img alt="[Note]" src="images/note.png" /> </td> <th align="left">Note</th> </tr> <tr> <td align="left" valign="top"> <p>By default, you cannot modify revision properties in a Subversion repository. Your repository administrator must explicitly enable revision property modifications by creating a hook named <code class="literal">pre-revprop-change</code>. See <a class="xref" href="svn.reposadmin.create.html#svn.reposadmin.hooks" title="Implementing Repository Hooks">the section called “Implementing Repository Hooks”</a> for more information on hook scripts.</p> </td> </tr> </table> </div> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="svn.ref.svn.c.proplist.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="svn.ref.svn.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="svn.ref.svn.c.relocate.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">svn proplist (plist, pl) </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> svn relocate</td> </tr> </table> </div> <div xmlns="" id="vcws-footer"> <hr /> <img src="images/cc-by.png" style="float: right;" /> <p>You are reading <em>Version Control with Subversion</em> (for Subversion 1.8), by Ben Collins-Sussman, Brian W. Fitzpatrick, and C. Michael Pilato.</p> <p>This work is licensed under the <a href="http://creativecommons.org/licenses/by/2.0/">Creative Commons Attribution License v2.0</a>.</p> <p>To submit comments, corrections, or other contributions to the text, please visit <a href="http://www.svnbook.com/">http://www.svnbook.com/</a>.</p> </div> </body> </html>