snipt

Ctrl+h for KB shortcuts

Bash

Remove all deleted files from svn

svn status | grep ! | cut -d " " -f 8 | xargs -n 1 svn rm --force
https://snipt.net/embed/0c8f5b88be56994040bac6e8682ffb79/
/raw/0c8f5b88be56994040bac6e8682ffb79/
0c8f5b88be56994040bac6e8682ffb79
bash
Bash
1
2019-06-14T12:31:55
True
False
False
/api/public/snipt/25517/
remove-all-deleted-files-from-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 status <span class="p">|</span> grep ! <span class="p">|</span> cut -d <span class="s2">&quot; &quot;</span> -f <span class="m">8</span> <span class="p">|</span> xargs -n <span class="m">1</span> svn rm --force </span></pre></div> </td></tr></table>
svn, xargs

Bash

clone svn repo into git

1
2
3
4
git svn clone http://account.svn.beanstalkapp.com/my-project my-project
cd my-project
git remote add beanstalk [email protected]:/userwish.git
git push beanstalk master
https://snipt.net/embed/e1ba315a8be8e76ea2e715ca36d3d46f/
/raw/e1ba315a8be8e76ea2e715ca36d3d46f/
e1ba315a8be8e76ea2e715ca36d3d46f
bash
Bash
4
2019-06-19T15:52:19
True
False
False
/api/public/snipt/23087/
clone-svn-repo-into-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></span><span id="L-1"><a name="L-1"></a>git svn clone http://account.svn.beanstalkapp.com/my-project my-project </span><span id="L-2"><a name="L-2"></a><span class="nb">cd</span> my-project </span><span id="L-3"><a name="L-3"></a>git remote add beanstalk [email protected]:/userwish.git </span><span id="L-4"><a name="L-4"></a>git push beanstalk master </span></pre></div> </td></tr></table>
clone, git, svn

Bash

Clean .svn

find . -type d -name '.svn' -print0 | xargs -0 rm -rdf
https://snipt.net/embed/0dc6c53c7cbc988706821d2ddaec801c/
/raw/0dc6c53c7cbc988706821d2ddaec801c/
0dc6c53c7cbc988706821d2ddaec801c
bash
Bash
1
2019-06-13T03:55:13
True
False
False
/api/public/snipt/21545/
clean-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>find . -type d -name <span class="s1">&#39;.svn&#39;</span> -print0 <span class="p">|</span> xargs -0 rm -rdf </span></pre></div> </td></tr></table>
clean, svn

Bash

Remove pastas .svn recursivamente

1
2
3
# remove todas as pastas .svn na pasta atual e subpastas
# ref:http://whitt.wordpress.com/2006/11/14/how-to-recursively-remove-svn-metadata/
find . -name .svn -print0 | xargs -0 rm -rf
https://snipt.net/embed/e3db6f3ecaa5b9ef173b2c4381d23306/
/raw/e3db6f3ecaa5b9ef173b2c4381d23306/
e3db6f3ecaa5b9ef173b2c4381d23306
bash
Bash
3
2019-06-19T21:39:42
True
False
False
/api/public/snipt/21327/
remove-pastas-svn-recursivamente
<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></span><span id="L-1"><a name="L-1"></a><span class="c1"># remove todas as pastas .svn na pasta atual e subpastas</span> </span><span id="L-2"><a name="L-2"></a><span class="c1"># ref:http://whitt.wordpress.com/2006/11/14/how-to-recursively-remove-svn-metadata/</span> </span><span id="L-3"><a name="L-3"></a>find . -name .svn -print0 <span class="p">|</span> xargs -0 rm -rf </span></pre></div> </td></tr></table>
remove, svn

Text only

libapr-1.dll was not found

1
2
3
4
5
Since it's an issue of which .dll gets found in the path first, changing the order of items in PATH will take care of it. Make sure that the Python path comes before the Subversion\bin path

... C:\Python25;C:\Python25\Scripts;C:\Program Files\Subversion\bin; ...

set PATH=E:\BitNami Trac Stack\trac\Scripts;E:\BitNami Trac Stack/python;E:\BitNami Trac Stack/subversion\bin;E:\BitNami Trac Stack/sqlite;%PATH%
https://snipt.net/embed/7286c99d77a5d1f13569c7fd29c12eda/
/raw/7286c99d77a5d1f13569c7fd29c12eda/
7286c99d77a5d1f13569c7fd29c12eda
text
Text only
5
2019-06-16T22:36:14
True
False
False
/api/public/snipt/19006/
libapr-1dll-was-not-found
<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>Since it&#39;s an issue of which .dll gets found in the path first, changing the order of items in PATH will take care of it. Make sure that the Python path comes before the Subversion\bin path </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>... C:\Python25;C:\Python25\Scripts;C:\Program Files\Subversion\bin; ... </span><span id="L-4"><a name="L-4"></a> </span><span id="L-5"><a name="L-5"></a>set PATH=E:\BitNami Trac Stack\trac\Scripts;E:\BitNami Trac Stack/python;E:\BitNami Trac Stack/subversion\bin;E:\BitNami Trac Stack/sqlite;%PATH% </span></pre></div> </td></tr></table>
bitnami, python, svn, trac

Bash

List files from a start date to now() in SVN LOG

1
2
3
4
5
#LISTAR ARQUIVOS A PARTIR DA DATA DO COMMIT (pega da data informada até o ultimo commit):
svn log -v -r{2009-06-15}:HEAD | awk '/^r[0-9]+ / {user=$3} /project/ {if (user=="lawrence") {print $2}}' | sort | uniq

#LISTAR QUANTOS ARQUIVOS FORAM COMITADOS A PARTIR DA DATA DO COMMIT (pega da data informada até o ultimo commit). Similiar ao comando acima, a única mudança é que ele conta o número de linhas da saída:
svn log -v -r{2009-06-15}:HEAD | awk '/^r[0-9]+ / {user=$3} /project/ {if (user=="lawrence") {print $2}}' | sort | uniq | wc -l
https://snipt.net/embed/663219cee86230f21ebb6adfe63491bf/
/raw/663219cee86230f21ebb6adfe63491bf/
663219cee86230f21ebb6adfe63491bf
bash
Bash
5
2019-06-06T11:48:35
True
False
False
/api/public/snipt/18524/
list-files-from-a-start-date-to-now-in-svn-log
<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">#LISTAR ARQUIVOS A PARTIR DA DATA DO COMMIT (pega da data informada até o ultimo commit):</span> </span><span id="L-2"><a name="L-2"></a>svn log -v -r<span class="o">{</span>2009-06-15<span class="o">}</span>:HEAD <span class="p">|</span> awk <span class="s1">&#39;/^r[0-9]+ / {user=$3} /project/ {if (user==&quot;lawrence&quot;) {print $2}}&#39;</span> <span class="p">|</span> sort <span class="p">|</span> uniq </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1">#LISTAR QUANTOS ARQUIVOS FORAM COMITADOS A PARTIR DA DATA DO COMMIT (pega da data informada até o ultimo commit). Similiar ao comando acima, a única mudança é que ele conta o número de linhas da saída:</span> </span><span id="L-5"><a name="L-5"></a>svn log -v -r<span class="o">{</span>2009-06-15<span class="o">}</span>:HEAD <span class="p">|</span> awk <span class="s1">&#39;/^r[0-9]+ / {user=$3} /project/ {if (user==&quot;lawrence&quot;) {print $2}}&#39;</span> <span class="p">|</span> sort <span class="p">|</span> uniq <span class="p">|</span> wc -l </span></pre></div> </td></tr></table>
list, log, svn