snipt

Ctrl+h for KB shortcuts

Bash

Revert all svn files

1
2
3
4
5
# revert all edited
svn st -q | awk '{print $2;}' | xargs svn revert

# Remove all new files (after you reverted):
svn st | awk '{print $2;}' | xargs rm
https://snipt.net/embed/f71db24fb60617c52d1022fd45abed16/
/raw/f71db24fb60617c52d1022fd45abed16/
f71db24fb60617c52d1022fd45abed16
bash
Bash
6
2019-05-23T01:19:14
True
False
False
/api/public/snipt/41031/
revert-all-svn-files
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># revert all edited</span> </span><span id="L-2"><a name="L-2"></a>svn st -q <span class="p">|</span> awk <span class="s1">&#39;{print $2;}&#39;</span> <span class="p">|</span> xargs svn revert </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1"># Remove all new files (after you reverted):</span> </span><span id="L-5"><a name="L-5"></a>svn st <span class="p">|</span> awk <span class="s1">&#39;{print $2;}&#39;</span> <span class="p">|</span> xargs rm </span></pre></div> </td></tr></table>