<?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>svnlook diff</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.svnlook.html" title="svnlook Reference—Subversion Repository Examination" /> <link rel="prev" href="svn.ref.svnlook.c.date.html" title="svnlook date" /> <link rel="next" href="svn.ref.svnlook.c.dirs-changed.html" title="svnlook dirs-changed" /> </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">svnlook diff</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="svn.ref.svnlook.c.date.html">Prev</a> </td> <th width="60%" align="center">svnlook Reference—Subversion Repository Examination</th> <td width="20%" align="right"> <a accesskey="n" href="svn.ref.svnlook.c.dirs-changed.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="svn.ref.svnlook.c.diff"></a> <div class="titlepage"></div> <a id="idm14539" class="indexterm"></a> <div class="refnamediv"> <h2>Name</h2> <p>svnlook diff — Print differences of changed files and properties.</p> </div> <div class="refsynopsisdiv"> <h2>Synopsis</h2> <p> <code class="literal">svnlook diff REPOS_PATH</code> </p> </div> <div class="refsect1"> <a id="idm14549"></a> <h2>Description</h2> <p>Print GNU-style differences of changed files and properties in a repository.</p> </div> <div class="refsect1"> <a id="idm14552"></a> <h2>Options</h2> <div class="informalexample"> <pre class="screen"> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.diff_cmd"><code class="option">--diff-cmd</code> <em class="replaceable"><code>CMD</code></em></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.diff_copy_from"><code class="option">--diff-copy-from</code></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.ignore_properties"><code class="option">--ignore-properties</code></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.no_diff_added"><code class="option">--no-diff-added</code></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.no_diff_deleted"><code class="option">--no-diff-deleted</code></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.properties_only"><code class="option">--properties-only</code></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.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.svnlook.html#svn.ref.svnlook.sw.transaction"><code class="option">--transaction</code> (<code class="option">-t</code>) <em class="replaceable"><code>ID</code></em></a> <a class="xref" href="svn.ref.svnlook.html#svn.ref.svnlook.sw.extensions"><code class="option">--extensions</code> (<code class="option">-x</code>) <em class="replaceable"><code>ARG</code></em></a> </pre> </div> </div> <div class="refsect1"> <a id="idm14565"></a> <h2>Examples</h2> <p>This shows a newly added (empty) file, a modified binary file, and a renamed (that is, copied and deleted) file with modifications:</p> <div class="informalexample"> <pre class="screen"> $ svnlook diff -r 40 /var/svn/repos Copied: trunk/relish.txt (from rev 39, trunk/vendors/deli/pickle.txt) =================================================================== --- trunk/relish.txt (rev 0) +++ trunk/relish.txt 2013-01-29 20:39:17 UTC (rev 40) @@ -0,0 +1 @@ +Pickle relish is mostly made from cucumbers. Deleted: trunk/vendors/deli/pickle.txt =================================================================== --- trunk/vendors/deli/pickle.txt (rev 39) +++ trunk/vendors/deli/pickle.txt 2013-01-29 20:39:17 UTC (rev 49) @@ -1 +0,0 @@ -Pickles are mostly made from cucumbers. Modified: trunk/vendors/deli/logo.jpg =================================================================== (Binary files differ) Added: trunk/vendors/deli/soda.txt =================================================================== $ </pre> </div> <p>By default, <span class="command"><strong>svnlook diff</strong></span> will treat copied files very much like any other added file, displaying in their entirety the contents of the new file and merely using a different label to draw the copy/add distinction. However, you can use the <code class="option">--diff-copy-from</code> option to cause <span class="command"><strong>svnlook diff</strong></span> to consider a copied file as worthy of mention only if it differs from the file from which it was copied, and to actually describe those differences.</p> <div class="informalexample"> <pre class="screen"> $ svnlook diff -r 40 /var/svn/repos --diff-copy-from Copied: trunk/relish.txt (from rev 39, trunk/vendors/deli/pickle.txt) =================================================================== --- trunk/vendors/deli/pickle.txt 2013-01-29 20:39:17 UTC (rev 39) +++ trunk/relish.txt 2013-01-29 20:47:40 UTC (rev 3) @@ -1 +1 @@ -Pickles are mostly made from cucumbers. +Pickle relish is mostly made from cucumbers. Deleted: trunk/vendors/deli/pickle.txt =================================================================== --- trunk/vendors/deli/pickle.txt (rev 39) +++ trunk/vendors/deli/pickle.txt 2013-01-29 20:39:17 UTC (rev 40) @@ -1 +0,0 @@ -Pickles are mostly made from cucumbers. Modified: trunk/vendors/deli/logo.jpg =================================================================== (Binary files differ) Added: trunk/vendors/deli/soda.txt ============================================================================== $ </pre> </div> <p>Use the <code class="option">--no-diff-deleted</code> option to silence output regarding deleted files.</p> <div class="informalexample"> <pre class="screen"> $ svnlook diff -r 40 /var/svn/repos --no-diff-deleted Copied: trunk/relish.txt (from rev 39, trunk/vendors/deli/pickle.txt) =================================================================== --- trunk/relish.txt (rev 0) +++ trunk/relish.txt 2013-01-29 20:39:17 UTC (rev 40) @@ -0,0 +1 @@ +Pickle relish is mostly made from cucumbers. Modified: trunk/vendors/deli/logo.jpg =================================================================== (Binary files differ) Added: trunk/vendors/deli/soda.txt ============================================================================== $ </pre> </div> <p>Note that in each of the previous examples, when a file has a nontextual <code class="literal">svn:mime-type</code> property, the differences are not explicitly shown.</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.svnlook.c.date.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="svn.ref.svnlook.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="svn.ref.svnlook.c.dirs-changed.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">svnlook date </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> svnlook dirs-changed</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>