]>
Commit | Line | Data |
---|---|---|
54faf10e MP |
1 | --- fixcvsdiff-ori.in Fri Apr 19 21:32:12 2002 |
2 | +++ fixcvsdiff.in Fri Apr 19 21:36:57 2002 | |
3 | @@ -10,6 +10,8 @@ | |
4 | # | |
5 | # -b keeps a .bak backup file | |
6 | # | |
7 | +# -a converts pathes to diff'ed files using RCS file path | |
8 | +# | |
9 | # Based on code by Amir Karger <karger@post.harvard.edu> | |
10 | # | |
11 | # Modified by John Levon <moz@compsoc.man.ac.uk> | |
12 | @@ -20,10 +22,10 @@ | |
13 | # your option) any later version. | |
14 | ||
15 | use Getopt::Std; | |
16 | -our ($opt_b,$opt_p); | |
17 | +our ($opt_b,$opt_p,$opt_a); | |
18 | $add = 0; | |
19 | ||
20 | -getopts('pb'); | |
21 | +getopts('pba'); | |
22 | ||
23 | if (defined($opt_b)) { | |
24 | $^I = '.bak'; | |
25 | @@ -36,6 +38,9 @@ | |
26 | if (/^Index: (.*)/) { | |
27 | $Filename = $1; | |
28 | } | |
29 | + if (/^RCS\ file: (.*)$Filename,v$/) { | |
30 | + $p = $1; | |
31 | + } | |
32 | ||
33 | if (!defined($Filename)) { | |
34 | print; | |
35 | @@ -72,5 +77,9 @@ | |
36 | $add = 0; | |
37 | } | |
38 | } | |
39 | + if($opt_a) { | |
40 | + s#^\-\-\- $Filename#--- $p$Filename#; | |
41 | + s#^\+\+\+ $Filename#+++ $p$Filename#; | |
42 | + } | |
43 | print; | |
44 | } |