timshadel
1/23/2009 - 10:57 PM

SVN log filter: Search the last 1000 lines of `svn log` for anything that references me, except those commits that used the `svnmerge` tool.

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