snipt

Ctrl+h for KB shortcuts

Text only

Accept certificate on SVn

svn list http://domain/repository
https://snipt.net/embed/66aa9ac3a886139c13f99351beae9527/
/raw/66aa9ac3a886139c13f99351beae9527/
66aa9ac3a886139c13f99351beae9527
text
Text only
1
2019-06-20T04:58:22
True
False
False
/api/public/snipt/3412/
accept-certificate-on-svn
<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 list http://domain/repository </span></pre></div> </td></tr></table>
bash, svn

Bash

merge changes from a branch into the main trunk

svn merge -r30:HEAD <svn branch path>
https://snipt.net/embed/6ac61a8d14d87fd481a588272b82a824/
/raw/6ac61a8d14d87fd481a588272b82a824/
6ac61a8d14d87fd481a588272b82a824
bash
Bash
1
2019-06-24T13:35:37
True
False
False
/api/public/snipt/3244/
merge-changes-from-a-branch-into-the-main-trunk
<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 merge -r30:HEAD &lt;svn branch path&gt; </span></pre></div> </td></tr></table>
svn

Bash

find the revision from which a branch was copied

svn log --verbose --stop-on-copy <svn repository path>
https://snipt.net/embed/b083c7e09966ba3d1ec64439f0ba44f8/
/raw/b083c7e09966ba3d1ec64439f0ba44f8/
b083c7e09966ba3d1ec64439f0ba44f8
bash
Bash
1
2019-06-26T00:22:03
True
False
False
/api/public/snipt/3243/
find-the-revision-from-which-a-branch-was-copied
<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 log --verbose --stop-on-copy &lt;svn repository path&gt; </span></pre></div> </td></tr></table>
svn

Bash

delete .svn directories, good for copying sections of code to a new repository

find . -name ".svn" -type d -exec rm -rf {} \;
https://snipt.net/embed/6b5a5314f19ed662342d8f57f934507b/
/raw/6b5a5314f19ed662342d8f57f934507b/
6b5a5314f19ed662342d8f57f934507b
bash
Bash
1
2019-06-25T14:19:39
True
False
False
/api/public/snipt/3241/
delete-svn-directories-good-for-copying-sections-of-code-to-a-new-repository
<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> -type d -exec rm -rf <span class="o">{}</span> <span class="se">\;</span> </span></pre></div> </td></tr></table>
bash, exec, find, svn

Bash

command line to clear svn files from a working copy so it's like an export

1
2
3
4
# See what will be deleted first...
ls -R /target/directory/path/ | grep "^/.*:$" | grep \.svn
# Delete the files... use with caution - CANNOT UNDO THIS
ls -R /target/directory/path/ | grep "^/.*:$" | grep \.svn | xargs rm -f
https://snipt.net/embed/a2a28062906b16d451fb773b18adbd09/
/raw/a2a28062906b16d451fb773b18adbd09/
a2a28062906b16d451fb773b18adbd09
bash
Bash
4
2019-06-22T19:20:12
True
False
False
/api/public/snipt/3177/
command-line-to-clear-svn-files-from-a-working-copy-so-its-like-an-export
<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></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1"># See what will be deleted first...</span> </span><span id="L-2"><a name="L-2"></a>ls -R /target/directory/path/ <span class="p">|</span> grep <span class="s2">&quot;^/.*:</span>$<span class="s2">&quot;</span> <span class="p">|</span> grep <span class="se">\.</span>svn </span><span id="L-3"><a name="L-3"></a><span class="c1"># Delete the files... use with caution - CANNOT UNDO THIS</span> </span><span id="L-4"><a name="L-4"></a>ls -R /target/directory/path/ <span class="p">|</span> grep <span class="s2">&quot;^/.*:</span>$<span class="s2">&quot;</span> <span class="p">|</span> grep <span class="se">\.</span>svn <span class="p">|</span> xargs rm -f </span></pre></div> </td></tr></table>
.svn, clean, delete, files, svn, workingcopy

Bash

delete files not under revision

svn status | grep ? | awk '{print $2}' | xargs rm -rf
https://snipt.net/embed/08e863680ea493333b7c34e2c88733c4/
/raw/08e863680ea493333b7c34e2c88733c4/
08e863680ea493333b7c34e2c88733c4
bash
Bash
1
2019-06-24T18:52:12
True
False
False
/api/public/snipt/3136/
delete-files-not-under-revision
<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="p">|</span> awk <span class="s1">&#39;{print $2}&#39;</span> <span class="p">|</span> xargs rm -rf </span></pre></div> </td></tr></table>
svn

Bash

Change working copy svn url

## CD into working copy directory and use the full url (ie SVN+SSH:// ...)
svn switch --relocate OLD_REPO_URL NEW_REPO_URL
https://snipt.net/embed/c3b9955dcf030c318e36ed95a044f035/
/raw/c3b9955dcf030c318e36ed95a044f035/
c3b9955dcf030c318e36ed95a044f035
bash
Bash
2
2019-06-25T21:50:55
True
False
False
/api/public/snipt/2449/
change-working-copy-svn-url
<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">## CD into working copy directory and use the full url (ie SVN+SSH:// ...)</span> </span><span id="L-2"><a name="L-2"></a>svn switch --relocate OLD_REPO_URL NEW_REPO_URL </span></pre></div> </td></tr></table>
bash, svn, url

Bash

recursively delete .svn directories

find . -name .svn -print0 | xargs -0 rm -rf
https://snipt.net/embed/e0a33a77e0449b454bb2d91311c67639/
/raw/e0a33a77e0449b454bb2d91311c67639/
e0a33a77e0449b454bb2d91311c67639
bash
Bash
1
2019-05-31T20:40:40
True
False
False
/api/public/snipt/2437/
recursively-delete-svn-directories-1
<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>
svn