snipt

Ctrl+h for KB shortcuts

Bash

checkout svn repo without subdirectories

svn co url/to/repo mywc --depth=files
https://snipt.net/embed/b423ba788531e5ffdb5dc52ed0b64c68/
/raw/b423ba788531e5ffdb5dc52ed0b64c68/
b423ba788531e5ffdb5dc52ed0b64c68
bash
Bash
1
2016-12-12T06:35:37
True
False
False
/api/public/snipt/2241/
checkout-svn-repo-without-subdirectories
<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>svn co url/to/repo mywc --depth<span class="o">=</span>files </span></pre></div> </td></tr></table>
subversion

Bash

On Mac OS X you have to add the encrypted version of the user's password when using subversion with apache.

# as_root command arg file username password
sudo htpasswd -b passwd user userpassword
https://snipt.net/embed/f1b65b79bbe82fab33ccdced43b4c391/
/raw/f1b65b79bbe82fab33ccdced43b4c391/
f1b65b79bbe82fab33ccdced43b4c391
bash
Bash
2
2019-06-15T11:34:46
True
False
False
/api/public/snipt/2082/
on-mac-os-x-you-have-to-add-the-encrypted-version-of-the-users-password-when-using-subversion-with-apache
<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><span class="c1"># as_root command arg file username password</span> </span><span id="L-2"><a name="L-2"></a>sudo htpasswd -b passwd user userpassword </span></pre></div> </td></tr></table>
apache, encrypted, file, passwd, password, subversion, svn, users

Bash

apply svn patch

patch -p0 -i ~/fix_ugly_bug.diff
https://snipt.net/embed/255eb29493f16ac032fed2cb1c01ad2f/
/raw/255eb29493f16ac032fed2cb1c01ad2f/
255eb29493f16ac032fed2cb1c01ad2f
bash
Bash
1
2019-02-20T06:17:20
True
False
False
/api/public/snipt/596/
apply-svn-patch
<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>patch -p0 -i ~/fix_ugly_bug.diff </span></pre></div> </td></tr></table>
subversion

Bash

svn delete all files marked for deletion

svn status |grep '^!' |sed 's/^!      /svn delete "/g' |sed 's/$/"/g' |sh
https://snipt.net/embed/13be4cf6c9164f255653122f1f9bad8d/
/raw/13be4cf6c9164f255653122f1f9bad8d/
13be4cf6c9164f255653122f1f9bad8d
bash
Bash
1
2019-06-16T01:17:06
True
False
False
/api/public/snipt/69/
svn-delete-all-files-marked-for-deletion
<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>svn status <span class="p">|</span>grep <span class="s1">&#39;^!&#39;</span> <span class="p">|</span>sed <span class="s1">&#39;s/^! /svn delete &quot;/g&#39;</span> <span class="p">|</span>sed <span class="s1">&#39;s/$/&quot;/g&#39;</span> <span class="p">|</span>sh </span></pre></div> </td></tr></table>
subversion

Bash

svn add all files marked for add

svn status |grep '^?' |sed 's/^?      /svn add "/g' |sed 's/$/"/g' |sh
https://snipt.net/embed/d08a99d87660f35353d5fb6cd0f1b15b/
/raw/d08a99d87660f35353d5fb6cd0f1b15b/
d08a99d87660f35353d5fb6cd0f1b15b
bash
Bash
1
2019-06-13T06:54:41
True
False
False
/api/public/snipt/68/
svn-add-all-files-marked-for-add
<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>svn status <span class="p">|</span>grep <span class="s1">&#39;^?&#39;</span> <span class="p">|</span>sed <span class="s1">&#39;s/^? /svn add &quot;/g&#39;</span> <span class="p">|</span>sed <span class="s1">&#39;s/$/&quot;/g&#39;</span> <span class="p">|</span>sh </span></pre></div> </td></tr></table>
subversion

Bash

recursively remove all .svn directories

find . -name .svn -print0 | xargs -0 rm -rf
https://snipt.net/embed/c1a0386cbfe673d8aecaf85d012372c2/
/raw/c1a0386cbfe673d8aecaf85d012372c2/
c1a0386cbfe673d8aecaf85d012372c2
bash
Bash
1
2019-06-13T06:55:05
True
False
False
/api/public/snipt/67/
recursively-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 .svn -print0 <span class="p">|</span> xargs -0 rm -rf </span></pre></div> </td></tr></table>
subversion