From: ueno Date: Tue, 22 Jan 2008 22:38:07 +0000 (+0000) Subject: New file. X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=6e6e734c4fb98c3f962008ef15ba43521e417530;p=elisp%2Fepg.git New file. --- diff --git a/find-changes-by-mia b/find-changes-by-mia new file mode 100755 index 0000000..5a32f1b --- /dev/null +++ b/find-changes-by-mia @@ -0,0 +1,27 @@ +#!/usr/bin/env ruby + +file, rev, author, state = nil, nil, nil, :F +mia_committers = ARGV +IO.popen('cvs log') do |io| + io.each_line do |line| + line.chomp! + case line + when /\A-+\z/ + state = :R + if rev && author && mia_committers.include?(author) + prev_rev = rev.sub(/\d+\z/) {|s| (s.to_i - 1).to_s} + puts("cvs diff -r #{prev_rev} -r #{rev} #{File.basename(file)}") + end + rev, author = nil, nil + when /\A=+\z/ + state = :F + file, rev, author = nil, nil, nil + when /\ARCS file:\s+(.+),v\z/ + file = $1 if state == :F + when /\Arevision\s+([0-9.]+)\z/ + rev = $1 if state == :R + when /\Adate:\s+(?:.+?);\s+author:\s+(.+?);/ + author = $1 if state == :R + end + end +end