From 6e6e734c4fb98c3f962008ef15ba43521e417530 Mon Sep 17 00:00:00 2001 From: ueno Date: Tue, 22 Jan 2008 22:38:07 +0000 Subject: [PATCH] New file. --- find-changes-by-mia | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 find-changes-by-mia 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 -- 1.7.10.4