svn log svn_url | perl -e '$/="-"x72;while(<STDIN>){print"$r\n"if((($ +r)=split)&&/@ARGV/)}' search_term
Where svn_url is the repository path you're interested in, and search_term is the thing to search for. Basically, it just remembers the last revision number to have appeared before your search term, and prints it. Will break if for some reason you are fond of putting horizontal rules (i.e. 72 consecutive - characters) in your commit messages.
Note that search_term will be interpolated as a regex, so while you can use e.g. foo\|bar, if you use special characters (such as .) they will have their special meanings unless escaped.
I would rather do -n than while (<STDIN>) {...}, but perl then treats my search term as a file to be processed, which makes me sad. Suggestions for improvements are welcome.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Find svn log revisions with log message matching a given string
by hossman (Prior) on Jan 27, 2010 at 02:30 UTC | |
by bellaire (Hermit) on Jan 27, 2010 at 12:55 UTC | |
|
Re: Find svn log revisions with log message matching a given string
by Anonymous Monk on May 18, 2014 at 22:39 UTC | |
by choroba (Cardinal) on May 18, 2014 at 22:40 UTC | |
by Anonymous Monk on May 21, 2014 at 03:49 UTC | |
by Anonymous Monk on May 21, 2014 at 03:51 UTC | |
by choroba (Cardinal) on May 21, 2014 at 08:53 UTC | |
|