diff options
author | N.N. <matju@users.sourceforge.net> | 2010-01-05 22:49:36 +0000 |
---|---|---|
committer | N.N. <matju@users.sourceforge.net> | 2010-01-05 22:49:36 +0000 |
commit | 8dbec761cf858ea65900c8a094599857208d8c3a (patch) | |
tree | 3228c023f87f23a354da3b57fdc2afe5b7052032 /desiredata/src/plusminus | |
parent | 529e59635598e2d90a7a49f6b4c676f8366109ba (diff) |
svn path=/trunk/; revision=12907
Diffstat (limited to 'desiredata/src/plusminus')
-rwxr-xr-x | desiredata/src/plusminus | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/desiredata/src/plusminus b/desiredata/src/plusminus deleted file mode 100755 index 553f84fa..00000000 --- a/desiredata/src/plusminus +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env ruby -# plusminus, Copyright © 2004 by Mathieu Bouchard -# this program makes stats about a unified diff (diff -u) output. -# for example, run this command: cvs diff -u | ./plusminus -# NOTE: the -u option is required! (you can put it in ~/.cvsrc) - -puts "-"*64 - -$plustot=0 -$minustot=0 - -def show - printf "%20s %+5d %+5d (net %+5d)\n", $file, $plus, -$minus, $plus-$minus -end - -loop{ - line = gets - break if not line - if /^diff/.match line then - x = line.split(/\s+/) - $plustot+=$plus if $plus - $minustot+=$minus if $minus - show if $file - $file = x[-1] - $on=false - $plus=0 - $minus=0 - elsif /^\@\@/ =~ line then $on=true - elsif $on and /^\+/ =~ line then $plus+=1 - elsif $on and /^\-/ =~ line then $minus+=1 - end -} - -$plustot+=$plus if $plus -$minustot+=$minus if $minus -show if $file - -$file="total" -$plus=$plustot -$minus=$minustot -puts "-"*64 -show |