Skip to content

Instantly share code, notes, and snippets.

@timshadel
Created January 23, 2009 22:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timshadel/51249 to your computer and use it in GitHub Desktop.
Save timshadel/51249 to your computer and use it in GitHub Desktop.
SVN log filter: Search the last 1000 lines of `svn log` for anything that references me, except those commits that used the `svnmerge` tool.
@record = []
def record_match?
record_string = @record.join(" ")
record_string =~ /shadel/i && record_string !~ /svnmerge/
end
def print_record
puts @record.join
end
`svn log --stop-on-copy`.each do |line|
if line =~ /-----$/
print_record if record_match?
@record = []
end
@record << line
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment