<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>beer planet &#187; co</title>
	<atom:link href="http://beerpla.net/tag/co/feed/" rel="self" type="application/rss+xml" />
	<link>http://beerpla.net</link>
	<description>where things have nothing to do with beer - tutorials, tips, how-tos, thoughts, hacks, and other techy nonsense</description>
	<lastBuildDate>Tue, 27 Jul 2010 04:25:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<atom:link rel='hub' href='http://beerpla.net/?pushpress=hub'/>
		<item>
		<title>How To Check If The Local SVN Revision Is Up-To-Date</title>
		<link>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/</link>
		<comments>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/#comments</comments>
		<pubDate>Thu, 24 Jul 2008 05:46:15 +0000</pubDate>
		<dc:creator>Artem Russakovskii</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[checkout]]></category>
		<category><![CDATA[co]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[dry run]]></category>
		<category><![CDATA[revision]]></category>
		<category><![CDATA[SVN]]></category>
		<category><![CDATA[up]]></category>
		<category><![CDATA[up-to-date]]></category>
		<category><![CDATA[update]]></category>
		<guid isPermaLink="false">http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/</guid>
		<description><![CDATA[<p>I&#039;ve encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn&#039;t have a dry-run option, so I had to find another solution.</p>
<p>I came up with 2, depending on how detailed the information needs to be, which I&#039;m about to share in this post.</p>
<p><strong>1. If you want exact file and directory names, you can run:</strong></p>
<p>
<div class="wp_syntax"><div class="code"><pre>svn status -u</pre></div></div>
</p>
<p>If any files need updating, you will see a * before the file name.</p>
<p><font face="consolas"></font></p>
<div class="wp_syntax"><div class="code"><pre>svn status</pre></div></div><p>...<div class=clear></div> <a href="http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/" class="read_more"><div class=excerpt-end>Read the rest of this article &#187;</div></a></p>]]></description>
			<content:encoded><![CDATA[<p>I&#039;ve encountered a problem recently where I had to figure out if some checked out code is up-to-date with the svn repository, without actually running svn update. Unfortunately, svn update doesn&#039;t have a dry-run option, so I had to find another solution.</p>
<p>I came up with 2, depending on how detailed the information needs to be, which I&#039;m about to share in this post.</p>
<p><strong>1. If you want exact file and directory names, you can run:</strong></p>
<p>
<div class="wp_syntax"><div class="code"><pre>svn status -u</pre></div></div>
</p>
<p>If any files need updating, you will see a * before the file name.</p>
<p><font face="consolas"></p>
<div class="wp_syntax"><div class="code"><pre>svn status wc
M     wc/bar.c
A  +   wc/qax.c</pre></div></div>
<p></font></p>
<p><font face="consolas"></p>
<div class="wp_syntax"><div class="code"><pre>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>
<p></font></p>
<p><font face="consolas">Or more verbose</font></p>
<p><font face="consolas"></p>
<div class="wp_syntax"><div class="code"><pre>svn status --show-updates --verbose wc
M            965       938 kfogel       wc/bar.c
       *     965       922 sussman      wc/foo.c
A  +         965       687 joe          wc/qax.c
             965       687 joe          wc/zig.c
Status against revision:   981</pre></div></div>
<p></font></p>
<p>Parsing the output in Perl, for instance, should be trivial. A connection to the repository is established for this check, so be sure to catch in your code the times when such connection is not available.</p>
<p><strong>2. If you only care about whether a specific directory needs to be updated or not, here&#039;s a quicker method:</strong></p>
<p>svn info vs svn info -rHEAD</p>
<p>
<div class="wp_syntax"><div class="code"><pre>cd somedir;
svn info -r HEAD | grep -i &quot;Last Changed Rev&quot;
Last Changed Rev: 8544
svn info | grep -i &quot;Last Changed Rev&quot;
Last Changed Rev: 8531</pre></div></div>
</p>
<p>If these numbers are not the same, an update is needed.</p>
<p>What can I be missing? Are there any other creative ways, or is svn update going to support dry-run? Feel free to leave a comment if you know something I don&#039;t.</p>
<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-twitter">
			<a href="http://twitter.com/home?status=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date+-+http://bit.ly/bpdXJa&amp;source=shareaholic" rel="nofollow" class="external" title="Tweet This!">Tweet This!</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;t=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-googlebuzz">
			<a href="http://www.google.com/buzz/post?url=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;imageurl=" rel="nofollow" class="external" title="Post on Google Buzz">Post on Google Buzz</a>
		</li>
		<li class="shr-hackernews">
			<a href="http://news.ycombinator.com/submitlink?u=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;t=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Submit this to Hacker News">Submit this to Hacker News</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Share this on Reddit">Share this on Reddit</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-stumbleupon">
			<a href="http://www.stumbleupon.com/submit?url=http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/&amp;title=How+To+Check+If+The+Local+SVN+Revision+Is+Up-To-Date" rel="nofollow" class="external" title="Stumble upon something good? Share it on StumbleUpon">Stumble upon something good? Share it on StumbleUpon</a>
		</li>
		<li class="shr-mail">
			<a href="mailto:?subject=%22How%20To%20Check%20If%20The%20Local%20SVN%20Revision%20Is%20Up-To-Date%22&amp;body=Link: http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/ (sent via shareaholic)%0D%0A%0D%0A----%0D%0A I%27ve%20encountered%20a%20problem%20recently%20where%20I%20had%20to%20figure%20out%20if%20some%20checked%20out%20code%20is%20up-to-date%20with%20the%20svn%20repository%2C%20without%20actually%20running%20svn%20update.%20Unfortunately%2C%20svn%20update%20doesn%27t%20have%20a%20dry-run%20option%2C%20so%20I%20had%20to%20find%20another%20solution.%20I%20came%20up%20with%202%2C%20depending%20on%20how%20detailed%20t" rel="nofollow" class="external" title="Email this to a friend?">Email this to a friend?</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>
Similar Posts:<ul><li><a href="http://beerpla.net/2010/02/20/how-to-view-a-specific-svn-revision-in-your-browser/" rel="bookmark" title="February 20, 2010">How To View A Specific SVN Revision In Your Browser</a></li>
<li><a href="http://beerpla.net/2008/06/16/how-to-svn-update-all-your-wordpress-plugins-in-one-go/" rel="bookmark" title="June 16, 2008">How To SVN Update All Your WordPress Plugins In One Go</a></li>
<li><a href="http://beerpla.net/2006/07/15/converting-from-cvs-to-svn-developers-notes-and-why-svn-is-better/" rel="bookmark" title="July 15, 2006">Converting from CVS to SVN: Developer&#039;s Notes And Why SVN Is Better</a></li>
<li><a href="http://beerpla.net/2010/03/06/how-to-show-hiddeninvisible-files-in-total-commander-both-locally-and-on-an-ftp-server/" rel="bookmark" title="March 6, 2010">How To Show Hidden/Invisible Files In Total Commander, Both Locally And On An FTP Server</a></li>
<li><a href="http://beerpla.net/2009/06/20/how-to-properly-set-svn-svnexternals-property-in-svn-command-line/" rel="bookmark" title="June 20, 2009">How To Properly Set SVN svn:externals Property In SVN Command Line</a></li>
</ul><!-- Similar Posts took 9.583 ms --><p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://beerpla.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://beerpla.net/2008/07/23/how-to-check-if-the-local-svn-revision-is-up-to-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
