Open main menu

Changes

1,180 bytes added ,  08:49, 4 December 2015
no edit summary
This page is about 'Subversion' which is more commonly known as svn.
 
{{highlight|
|text = if you need help [[Git/migrating to git|migrating to git]] then call Greg Rundlett at {{CompanyName}} }}
 
==See Also==
* [[Google:{{PAGENAME}}]]
* '''[[:Category:{{PAGENAME}}]]'''
 
* [[Subversion/client]]
* [[Subversion/Vendor Sources]]
file:///var/svn/myrepo/www.example.com/trunk/images/smile1.png
</pre>
 
=== Deleting untracked files ===
Say your project spews build artifacts into your source tree, and doesn't clean up after itself. How do you clean out your working copy without having to do a clean checkout?
<source lang="bash">
svn status -no-ignore | grep -e ^\? -e ^I | awk '{ print $2 }' | xargs --no-run-if-empty rm -r
</source>
 
=== Last Week's svn Log ===
<source lang="bash">
svn -vr {$(date --iso-8601 --date="last week")}:HEAD log http://code.example.com/svn/project/trunk/
</source>
 
=== Add a bunch of new files ===
<source lang="bash">
svn status . | grep '^?' | sed 's/^? */svn add "/g' | sed 's/$/"/g' | sh
</source>
 
=== Find in svn ===
Old versions of Subversion would store metadata throughout the working copy, and offers no facility for searching the content. While you could and should setup a [[Search|fantastic indexing service]], you
<source lang="bash">
find . -name \.svn/ -prune -o -name '*.php' -exec grep -l needle {} \; | sed 's/^/# /'
</source>
 
 
[[Category:Version Control]]
4,558

edits