CINXE.COM

svn status (stat, st)

<?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 status (stat, st)</title> <link rel="stylesheet" type="text/css" href="styles.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <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.revert.html" title="svn revert" /> <link rel="next" href="svn.ref.svn.c.switch.html" title="svn switch (sw)" /> </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 status (stat, st)</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="svn.ref.svn.c.revert.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.switch.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="svn.ref.svn.c.status"></a> <div class="titlepage"></div> <a id="idm12910" class="indexterm"></a> <div class="refnamediv"> <h2>Name</h2> <p>svn status (stat, st) — Print the status of working copy files and directories.</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <p> <code class="literal">svn status [PATH...]</code> </p> </div> <div class="refsect1"> <a id="idm12920"></a> <h2>Description</h2> <p>Print the status of working copy files and directories. With no arguments, it prints only locally modified items (no repository access). With <code class="option">--show-updates</code> (<code class="option">-u</code>), it adds working revision and server out-of-date information. With <code class="option">--verbose</code> (<code class="option">-v</code>), it prints full revision information on every item. With <code class="option">--quiet</code> (<code class="option">-q</code>), it prints only summary information about locally modified items.</p> <p>The first seven columns in the output are each one character wide, and each column gives you information about a different aspect of each working copy item.</p> <p>The first column indicates that an item was added, deleted, or otherwise changed:</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>No modifications.</p> </dd> <dt> <span class="term"> <code class="literal">'A'</code> </span> </dt> <dd> <p>Item is scheduled for addition.</p> </dd> <dt> <span class="term"> <code class="literal">'D'</code> </span> </dt> <dd> <p>Item is scheduled for deletion.</p> </dd> <dt> <span class="term"> <code class="literal">'M'</code> </span> </dt> <dd> <p>Item has been modified.</p> </dd> <dt> <span class="term"> <code class="literal">'R'</code> </span> </dt> <dd> <p>Item has been replaced in your working copy. This means the file was scheduled for deletion, and then a new file with the same name was scheduled for addition in its place.</p> </dd> <dt> <span class="term"> <code class="literal">'C'</code> </span> </dt> <dd> <p>The contents (as opposed to the properties) of the item conflict with updates received from the repository.</p> </dd> <dt> <span class="term"> <code class="literal">'X'</code> </span> </dt> <dd> <p>Item is present because of an externals definition.</p> </dd> <dt> <span class="term"> <code class="literal">'I'</code> </span> </dt> <dd> <p>Item is being ignored (e.g., with the <code class="literal">svn:ignore</code> property).</p> </dd> <dt> <span class="term"> <code class="literal">'?'</code> </span> </dt> <dd> <p>Item is not under version control.</p> </dd> <dt> <span class="term"> <code class="literal">'!'</code> </span> </dt> <dd> <p>Item is missing (e.g., you moved or deleted it without using <span class="command"><strong>svn</strong></span>). This also indicates that a directory is incomplete (a checkout or update was interrupted).</p> </dd> <dt> <span class="term"> <code class="literal">'~'</code> </span> </dt> <dd> <p>Item is versioned as one kind of object (file, directory, link), but has been replaced by a different kind of object.</p> </dd> </dl> </div> <p>The second column tells the status of a file's or directory's properties:</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>No modifications.</p> </dd> <dt> <span class="term"> <code class="literal">'M'</code> </span> </dt> <dd> <p>Properties for this item have been modified.</p> </dd> <dt> <span class="term"> <code class="literal">'C'</code> </span> </dt> <dd> <p>Properties for this item are in conflict with property updates received from the repository.</p> </dd> </dl> </div> <p>The third column is populated only if the working copy directory is locked (see <a class="xref" href="svn.tour.cleanup.html" title="Sometimes You Just Need to Clean Up">the section called “Sometimes You Just Need to Clean Up”</a>):</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>Item is not locked.</p> </dd> <dt> <span class="term"> <code class="literal">'L'</code> </span> </dt> <dd> <p>Item is locked.</p> </dd> </dl> </div> <p>The fourth column is populated only if the item is scheduled for addition-with-history:</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>No history scheduled with commit.</p> </dd> <dt> <span class="term"> <code class="literal">'+'</code> </span> </dt> <dd> <p>History scheduled with commit.</p> </dd> </dl> </div> <p>The fifth column is populated only if the item is switched relative to its parent (see <a class="xref" href="svn.branchmerge.switchwc.html" title="Traversing Branches">the section called “Traversing Branches”</a>):</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>Item is a child of its parent directory.</p> </dd> <dt> <span class="term"> <code class="literal">'S'</code> </span> </dt> <dd> <p>Item is switched.</p> </dd> </dl> </div> <p>The sixth column is populated with lock information:</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>When <code class="option">--show-updates</code> (<code class="option">-u</code>) is used, this means the file is not locked. If <code class="option">--show-updates</code> (<code class="option">-u</code>) is <span class="emphasis"><em>not</em></span> used, this merely means that the file is not locked in this working copy.</p> </dd> <dt> <span class="term"> <code class="literal">'K'</code> </span> </dt> <dd> <p>File is locked in this working copy.</p> </dd> <dt> <span class="term"> <code class="literal">'O'</code> </span> </dt> <dd> <p>File is locked either by another user or in another working copy. This appears only when <code class="option">--show-updates</code> (<code class="option">-u</code>) is used.</p> </dd> <dt> <span class="term"> <code class="literal">'T'</code> </span> </dt> <dd> <p>File was locked in this working copy, but the lock has been <span class="quote">“<span class="quote">stolen</span>”</span> and is invalid. The file is currently locked in the repository. This appears only when <code class="option">--show-updates</code> (<code class="option">-u</code>) is used.</p> </dd> <dt> <span class="term"> <code class="literal">'B'</code> </span> </dt> <dd> <p>File was locked in this working copy, but the lock has been <span class="quote">“<span class="quote">broken</span>”</span> and is invalid. The file is no longer locked. This appears only when <code class="option">--show-updates</code> (<code class="option">-u</code>) is used.</p> </dd> </dl> </div> <p>The seventh column is populated only if the item is the victim of a tree conflict:</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>Item is not the victim of a tree conflict.</p> </dd> <dt> <span class="term"> <code class="literal">'C'</code> </span> </dt> <dd> <p>Item is the victim of a tree conflict.</p> </dd> </dl> </div> <p>The eighth column is always blank.</p> <p>The out-of-date information appears in the ninth column (only if you pass the <code class="option">--show-updates</code> (<code class="option">-u</code>) option):</p> <div class="variablelist"> <dl class="variablelist"> <dt> <span class="term"> <code class="literal">' '</code> </span> </dt> <dd> <p>The item in your working copy is up to date.</p> </dd> <dt> <span class="term"> <code class="literal">'*'</code> </span> </dt> <dd> <p>A newer revision of the item exists on the server.</p> </dd> </dl> </div> <p>The remaining fields are variable width and delimited by spaces. The working revision is the next field if the <code class="option">--show-updates</code> (<code class="option">-u</code>) or <code class="option">--verbose</code> (<code class="option">-v</code>) option is passed.</p> <p>If the <code class="option">--verbose</code> (<code class="option">-v</code>) option is passed, the last committed revision and last committed author are displayed next.</p> <p>The working copy path is always the final field, so it can include spaces.</p> </div> <div class="refsect1"> <a id="idm13120"></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.ignore_externals"><code class="option">--ignore-externals</code></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.incremental"><code class="option">--incremental</code></a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.no_ignore"><code class="option">--no-ignore</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.show_updates"><code class="option">--show-updates</code> (<code class="option">-u</code>)</a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.verbose"><code class="option">--verbose</code> (<code class="option">-v</code>)</a> <a class="xref" href="svn.ref.svn.html#svn.ref.svn.sw.xml"><code class="option">--xml</code></a> </pre> </div> </div> <div class="refsect1"> <a id="idm13133"></a> <h2>Examples</h2> <p>This is the easiest way to find out what changes you have made to your working copy:</p> <div class="informalexample"> <pre class="screen"> $ svn status wc M wc/bar.c A + wc/qax.c </pre> </div> <p>If you want to find out what files in your working copy are out of date, pass the <code class="option">--show-updates</code> (<code class="option">-u</code>) option (this will <span class="emphasis"><em>not</em></span> make any changes to your working copy). Here you can see that <code class="filename">wc/foo.c</code> has changed in the repository since we last updated our working copy:</p> <div class="informalexample"> <pre class="screen"> $ svn status -u wc M 965 wc/bar.c * 965 wc/foo.c A + 965 wc/qax.c Status against revision: 981 </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><code class="option">--show-updates</code> (<code class="option">-u</code>) <span class="emphasis"><em>only</em></span> places an asterisk next to items that are out of date (i.e., items that will be updated from the repository if you later use <span class="command"><strong>svn update</strong></span>). <code class="option">--show-updates</code> (<code class="option">-u</code>) does <span class="emphasis"><em>not</em></span> cause the status listing to reflect the repository's version of the item (although you can see the revision number in the repository by passing the <code class="option">--verbose</code> (<code class="option">-v</code>) option).</p> </td> </tr> </table> </div> <p>The most information you can get out of the status subcommand is as follows:</p> <div class="informalexample"> <pre class="screen"> $ svn status -u -v wc M 965 938 sally wc/bar.c * 965 922 harry wc/foo.c A + 965 687 harry wc/qax.c 965 687 harry wc/zig.c Status against revision: 981 </pre> </div> <p>Lastly, you can get <span class="command"><strong>svn status</strong></span> output in XML format with the <code class="option">--xml</code> option:</p> <div class="informalexample"> <pre class="screen"> $ svn status --xml wc &lt;?xml version="1.0"?&gt; &lt;status&gt; &lt;target path="wc"&gt; &lt;entry path="qax.c"&gt; &lt;wc-status props="none" item="added" revision="0"&gt; &lt;/wc-status&gt; &lt;/entry&gt; &lt;entry path="bar.c"&gt; &lt;wc-status props="normal" item="modified" revision="965"&gt; &lt;commit revision="965"&gt; &lt;author&gt;sally&lt;/author&gt; &lt;date&gt;2008-05-28T06:35:53.048870Z&lt;/date&gt; &lt;/commit&gt; &lt;/wc-status&gt; &lt;/entry&gt; &lt;/target&gt; &lt;/status&gt; </pre> </div> <p>For many more examples of <span class="command"><strong>svn status</strong></span>, see <a class="xref" href="svn.tour.cycle.html#svn.tour.cycle.examine.status" title="See an overview of your changes">the section called “See an overview of your changes”</a>.</p> </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.revert.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.switch.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">svn revert </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> svn switch (sw)</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>

Pages: 1 2 3 4 5 6 7 8 9 10