snipt

Ctrl+h for KB shortcuts

Bash

Subversion rollback

1
2
3
svn update
svn merge -r HEAD:140 .
svn commit -m "Rolled back to r140"
https://snipt.net/embed/d6e03c58efa5d501c4af47e2778982b0/
https://snipt.net/raw/d6e03c58efa5d501c4af47e2778982b0/
d6e03c58efa5d501c4af47e2778982b0
bash
Bash
3
2016-09-22T02:09:32
True
False
False
/api/public/snipt/139624/
subversion-rollback-b965a57b
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>svn update </span><span id="L-2"><a name="L-2"></a>svn merge -r HEAD:140 . </span><span id="L-3"><a name="L-3"></a>svn commit -m <span class="s2">&quot;Rolled back to r140&quot;</span> </span></pre></div> </td></tr></table>
svn

Bash

svn update with no interaction and accept certificate from cli

svn up --username <user> --password <psw> --non-interactive --trust-server-cert
https://snipt.net/embed/8ee9a30e7f44092e596ab7820a8c1502/
https://snipt.net/raw/8ee9a30e7f44092e596ab7820a8c1502/
8ee9a30e7f44092e596ab7820a8c1502
bash
Bash
1
2016-09-26T01:46:14
True
False
False
Jul 19, 2013 at 09:24 AM
/api/public/snipt/68603/
svn-update-with-no-interaction-and-accept-certificate-from-cli
<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 id="L-1"><a name="L-1"></a>svn up --username &lt;user&gt; --password &lt;psw&gt; --non-interactive --trust-server-cert </span></pre></div> </td></tr></table>
accept, certificate, cli, command, line, linux, shell, svn, up, update

Bash

SVN: get patch of changes between revisions

svn diff -r 70560:70561
https://snipt.net/embed/7b97016d9fda96c2361bba257a0bf448/
https://snipt.net/raw/7b97016d9fda96c2361bba257a0bf448/
7b97016d9fda96c2361bba257a0bf448
bash
Bash
1
2016-09-22T07:01:34
True
False
False
Jun 13, 2013 at 03:39 AM
/api/public/snipt/64056/
svn-get-patch-of-changes-between-revisions
<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 id="L-1"><a name="L-1"></a>svn diff -r 70560:70561 </span></pre></div> </td></tr></table>
svn

Bash

SVN: get overview of changed files between revisions

svn diff -r 70560:70561 --summarize [url_to_repo]
https://snipt.net/embed/563a198c91f2fb92168548b041602fc8/
https://snipt.net/raw/563a198c91f2fb92168548b041602fc8/
563a198c91f2fb92168548b041602fc8
bash
Bash
1
2016-09-22T12:51:14
True
False
False
Jun 13, 2013 at 03:38 AM
/api/public/snipt/64054/
svn-get-overview-of-changed-files-between-revisions
<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 id="L-1"><a name="L-1"></a>svn diff -r 70560:70561 --summarize <span class="o">[</span>url_to_repo<span class="o">]</span> </span></pre></div> </td></tr></table>
svn

Bash

SVN Revert to revision

svn merge -r REV_FROM:REV_TO .
svn commit -m "Reverted to ..."
https://snipt.net/embed/fec4726876e70c3777fbc6e956c6e8a0/
https://snipt.net/raw/fec4726876e70c3777fbc6e956c6e8a0/
fec4726876e70c3777fbc6e956c6e8a0
bash
Bash
2
2016-09-10T02:21:58
True
False
True
Sep 15, 2012 at 12:17 PM
/api/public/snipt/47227/
svn-revert-to-revision
<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 id="L-1"><a name="L-1"></a>svn merge -r REV_FROM:REV_TO . </span><span id="L-2"><a name="L-2"></a>svn commit -m <span class="s2">&quot;Reverted to ...&quot;</span> </span></pre></div> </td></tr></table>
"svn revert", svn

Text only

archive svn modified files

1
2
3
4
5
6
7
8
#archive all svn modified filed
svn st | grep ^M | awk '{print $2}' | xargs tar czf changed.tar.gz

#list contents of the archive
tar -tf changed.tar.gz

#for an entire repository
svn export URL PATH ; tar czf exported_copy.tgz PATH
https://snipt.net/embed/9e9353251d821ca3391aa73acb579fc0/
https://snipt.net/raw/9e9353251d821ca3391aa73acb579fc0/
9e9353251d821ca3391aa73acb579fc0
text
Text only
8
2016-09-22T14:57:39
True
False
False
/api/public/snipt/46533/
archive-svn-modified-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> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>#archive all svn modified filed </span><span id="L-2"><a name="L-2"></a>svn st | grep ^M | awk &#39;{print $2}&#39; | xargs tar czf changed.tar.gz </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a>#list contents of the archive </span><span id="L-5"><a name="L-5"></a>tar -tf changed.tar.gz </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>#for an entire repository </span><span id="L-8"><a name="L-8"></a>svn export URL PATH ; tar czf exported_copy.tgz PATH </span></pre></div> </td></tr></table>
awk, grep, svn

Text only

SVN: Revert commit

svn merge -r [current_version]:[previous_version] [repository_url]
https://snipt.net/embed/b5a1deeec737e0c9996d606b5aa6f45a/
https://snipt.net/raw/b5a1deeec737e0c9996d606b5aa6f45a/
b5a1deeec737e0c9996d606b5aa6f45a
text
Text only
1
2016-09-25T19:34:07
True
False
False
Aug 27, 2012 at 06:39 AM
/api/public/snipt/46333/
svn-revert-commit
<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 id="L-1"><a name="L-1"></a>svn merge -r [current_version]:[previous_version] [repository_url] </span></pre></div> </td></tr></table>
svn

Bash

PIP - GIT, HG, SVN

1
2
3
4
# install python modules from git, hg and svn using PIP
pip install git+http://hostname_or_ip/path/to/git-repo#egg=packagename
pip install hg+http://hostname_or_ip/path/to/hg-repo#egg=packagename
pip install svn+http://hostname_or_ip/path/to/svn-repo#egg=packagename
https://snipt.net/embed/d50ed7184ba804dda308c07838a95b1e/
https://snipt.net/raw/d50ed7184ba804dda308c07838a95b1e/
d50ed7184ba804dda308c07838a95b1e
bash
Bash
4
2016-09-23T16:42:57
True
False
False
Aug 04, 2012 at 08:25 AM
/api/public/snipt/45138/
pip-git
<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 id="L-1"><a name="L-1"></a><span class="c"># install python modules from git, hg and svn using PIP</span> </span><span id="L-2"><a name="L-2"></a>pip install git+http://hostname_or_ip/path/to/git-repo#egg<span class="o">=</span>packagename </span><span id="L-3"><a name="L-3"></a>pip install hg+http://hostname_or_ip/path/to/hg-repo#egg<span class="o">=</span>packagename </span><span id="L-4"><a name="L-4"></a>pip install svn+http://hostname_or_ip/path/to/svn-repo#egg<span class="o">=</span>packagename </span></pre></div> </td></tr></table>
git, hg, pip, python, svn

Text only

Disconnect from svn repo

find . -name .svn -exec rm -rf {} \;
https://snipt.net/embed/eea4cc3b6b56a545947ac6c8388be310/
https://snipt.net/raw/eea4cc3b6b56a545947ac6c8388be310/
eea4cc3b6b56a545947ac6c8388be310
text
Text only
1
2016-09-25T14:33:14
True
False
False
Jul 15, 2012 at 03:17 PM
/api/public/snipt/43936/
disconnect-from-svn-repo
<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 id="L-1"><a name="L-1"></a>find . -name .svn -exec rm -rf {} \; </span></pre></div> </td></tr></table>
linux, svn
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.