<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Cool Bash One-Liner: SVN add all unadded files</title>
	<atom:link href="http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/</link>
	<description>I thought what I'd do was, I'd pretend I was one of those deaf mutes ... or should I?</description>
	<lastBuildDate>Sat, 21 Jan 2012 19:13:16 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.1</generator>
	<item>
		<title>By: Quinn Taylor</title>
		<link>http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/comment-page-1/#comment-66689</link>
		<dc:creator>Quinn Taylor</dc:creator>
		<pubDate>Thu, 02 Apr 2009 16:41:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/#comment-66689</guid>
		<description>After posting, I realized that handling path names with spaces in them is tricker, but still doable.  Here&#039;s one way: (Note: bash uses $IFS as the delimiter for splitting strings.)

function svnaddall () {
	ORIG_IFS=$IFS
	export IFS=$&#039;\n&#039;     # set Bash internal field separator to end-of-line char
	for resource in `svn status $@ &#124; grep &quot;^?&quot;`
	do
		svn add &quot;`python -c \&quot;print &#039;$resource&#039;[1:].strip()\&quot;`&quot;
	done
	export IFS=$ORIG_IFS # Restore previous internal field separator
}</description>
		<content:encoded><![CDATA[<p>After posting, I realized that handling path names with spaces in them is tricker, but still doable.  Here&#8217;s one way: (Note: bash uses $IFS as the delimiter for splitting strings.)</p>
<p>function svnaddall () {<br />
	ORIG_IFS=$IFS<br />
	export IFS=$&#8217;\n&#8217;     # set Bash internal field separator to end-of-line char<br />
	for resource in `svn status $@ | grep &#8220;^?&#8221;`<br />
	do<br />
		svn add &#8220;`python -c \&#8221;print &#8216;$resource&#8217;[1:].strip()\&#8221;`&#8221;<br />
	done<br />
	export IFS=$ORIG_IFS # Restore previous internal field separator<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Quinn Taylor</title>
		<link>http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/comment-page-1/#comment-66661</link>
		<dc:creator>Quinn Taylor</dc:creator>
		<pubDate>Wed, 01 Apr 2009 22:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.virtualchaos.co.uk/blog/2008/02/03/cool-bash-one-liner-svn-add-all-unadded-files/#comment-66661</guid>
		<description>This is really handy, I&#039;m glad I came across it! This tip becomes even more useful if you transform it into a bash function and place it in ~/.bashrc or someplace similar. Here&#039;s my version:

function svnaddall () {
	svn status $@ &#124; grep &quot;^?&quot; &#124; awk &#039;{ print $2 }&#039; &#124; xargs svn add
}

The $@ passes any arguments on to &#039;svn status&#039;, which allows you to add only specific files and directory hierarchies without cd-ing to each directory and running the command. For example, &#039;svnaddall foo.txt bar&#039; would avoid anything in any other part of the hierarchy under the current directory. Typing &#039;svnaddall&#039; with no arguments has the same effect as your one-liner.</description>
		<content:encoded><![CDATA[<p>This is really handy, I&#8217;m glad I came across it! This tip becomes even more useful if you transform it into a bash function and place it in ~/.bashrc or someplace similar. Here&#8217;s my version:</p>
<p>function svnaddall () {<br />
	svn status $@ | grep &#8220;^?&#8221; | awk &#8216;{ print $2 }&#8217; | xargs svn add<br />
}</p>
<p>The $@ passes any arguments on to &#8216;svn status&#8217;, which allows you to add only specific files and directory hierarchies without cd-ing to each directory and running the command. For example, &#8216;svnaddall foo.txt bar&#8217; would avoid anything in any other part of the hierarchy under the current directory. Typing &#8216;svnaddall&#8217; with no arguments has the same effect as your one-liner.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

