Homesource Forums

Homeworld Source Editing Talk
It is currently Mon Sep 25, 2017 10:52 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: svngrep
PostPosted: Mon Nov 20, 2006 6:06 pm 
Offline
coder
User avatar

Joined: Tue Dec 14, 2004 3:24 pm
Posts: 324
Location: UK (UTC+0)
Thanks to the directory structure of Subversion's working copies, greping through the code generates a lot of noise from the base versions stored in the .svn directories. I must admit I've been lazy up until now and simply piped into another grep that filtered the svn-related results out but that's not particularly efficient. This on the other hand is:

Code:
alias svngrep="find . -not -path '*\.svn*' | xargs -Ifiles grep files -H -e"

Yes, I could have used a -exec with the find but the above has one advantage: you can add any extra grep options you require to the command line. Note that the additional options should be specified after the search pattern. e.g: svngrep 'my debug comment' -n

_________________
MacHomeworld | HomeworldSDL.org


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group