snipt

Ctrl+h for KB shortcuts

Bash

svn bash shortcuts

1
2
3
4
5
6
7
alias .s='svn stat'
alias .c='svn ci -m'
alias .u='svn up'
alias .a='svn stat --ignore-externals | grep "^\?" | cut -c8- | while read f; do svn add "$f"; done'
alias .rm='svn stat --ignore-externals | grep "^\!" | cut -c8- | while read f; do svn rm "$f"; done'
alias .d='svn diff --diff-cmd diff -x -up'
alias .dd='svn diff --diff-cmd diff -x -wup'
https://snipt.net/embed/ce0144d89f93b6a768e587602aafe74d/
/raw/ce0144d89f93b6a768e587602aafe74d/
ce0144d89f93b6a768e587602aafe74d
bash
Bash
8
2019-07-04T21:47:55
True
False
False
/api/public/snipt/10803/
svn-bash-shortcuts
<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> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="nb">alias</span> .s<span class="o">=</span><span class="s1">&#39;svn stat&#39;</span> </span><span id="L-2"><a name="L-2"></a><span class="nb">alias</span> .c<span class="o">=</span><span class="s1">&#39;svn ci -m&#39;</span> </span><span id="L-3"><a name="L-3"></a><span class="nb">alias</span> .u<span class="o">=</span><span class="s1">&#39;svn up&#39;</span> </span><span id="L-4"><a name="L-4"></a><span class="nb">alias</span> .a<span class="o">=</span><span class="s1">&#39;svn stat --ignore-externals | grep &quot;^\?&quot; | cut -c8- | while read f; do svn add &quot;$f&quot;; done&#39;</span> </span><span id="L-5"><a name="L-5"></a><span class="nb">alias</span> .rm<span class="o">=</span><span class="s1">&#39;svn stat --ignore-externals | grep &quot;^\!&quot; | cut -c8- | while read f; do svn rm &quot;$f&quot;; done&#39;</span> </span><span id="L-6"><a name="L-6"></a><span class="nb">alias</span> .d<span class="o">=</span><span class="s1">&#39;svn diff --diff-cmd diff -x -up&#39;</span> </span><span id="L-7"><a name="L-7"></a><span class="nb">alias</span> .dd<span class="o">=</span><span class="s1">&#39;svn diff --diff-cmd diff -x -wup&#39;</span> </span></pre></div> </td></tr></table>
bash, svn

Bash

SVN add all new files (not fully tested)

svn status | grep "?" | sed s/'\?\s*'// > to-add
svn add --targets to-add
https://snipt.net/embed/a5ccd3986857401b76b6222272b1492b/
/raw/a5ccd3986857401b76b6222272b1492b/
a5ccd3986857401b76b6222272b1492b
bash
Bash
2
2019-07-15T07:01:19
True
False
False
/api/public/snipt/10364/
svn-add-new-all-new-files-not-fully-tested
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>svn status <span class="p">|</span> grep <span class="s2">&quot;?&quot;</span> <span class="p">|</span> sed s/<span class="s1">&#39;\?\s*&#39;</span>// &gt; to-add </span><span id="L-2"><a name="L-2"></a>svn add --targets to-add </span></pre></div> </td></tr></table>
bash, svn

Bash

Remove all SVN directories

find . -name ".svn" -exec rm -rf {} \;
https://snipt.net/embed/897e9315554cd8098e8a9a79360e4f4b/
/raw/897e9315554cd8098e8a9a79360e4f4b/
897e9315554cd8098e8a9a79360e4f4b
bash
Bash
2
2019-07-14T10:27:56
True
False
False
/api/public/snipt/8232/
remove-all-svn-directories
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>find . -name <span class="s2">&quot;.svn&quot;</span> -exec rm -rf <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
svn