Subversion: Difference between revisions

No edit summary
No edit summary
Line 2: Line 2:


{{highlight|
{{highlight|
|text = if you need help [[Git/migrating to git|migrating to git]] then call Greg Rundlett at eQuality-Tech.com }}
|text = if you need help [[Git/migrating to git|migrating to git]] then call Greg Rundlett at {{CompanyName}} }}


==See Also==
==See Also==
Line 176: Line 176:
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?
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">
<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>


svn status -no-ignore | grep -e ^\? -e ^I | awk '{ print $2 }' | xargs --no-run-if-empty rm -r
=== 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>
</source>


[[Category:Version Control]]
[[Category:Version Control]]