aboutsummaryrefslogtreecommitdiffstats
path: root/admin/revdiff
diff options
context:
space:
mode:
authorJuanma Barranquero2003-02-04 14:56:31 +0000
committerJuanma Barranquero2003-02-04 14:56:31 +0000
commit177c0ea74342272645959b82cf219faa0b3dba16 (patch)
tree44e22b210a9904eab25a66d12e708804b671df75 /admin/revdiff
parentdb95369be096960245dd38678f68464627698678 (diff)
downloademacs-177c0ea74342272645959b82cf219faa0b3dba16.tar.gz
emacs-177c0ea74342272645959b82cf219faa0b3dba16.zip
Trailing whitespace deleted.
Diffstat (limited to 'admin/revdiff')
-rwxr-xr-xadmin/revdiff28
1 files changed, 14 insertions, 14 deletions
diff --git a/admin/revdiff b/admin/revdiff
index f145da19c4a..416c572d196 100755
--- a/admin/revdiff
+++ b/admin/revdiff
@@ -21,11 +21,11 @@
21 21
22use File::Basename; 22use File::Basename;
23 23
24if (@ARGV < 3) 24if (@ARGV < 3)
25{ 25{
26 print <<USAGE; 26 print <<USAGE;
27revdiff FILE OLD NEW 27revdiff FILE OLD NEW
28 28
29Get a diff of FILE between revisions OLD and NEW. Store the 29Get a diff of FILE between revisions OLD and NEW. Store the
30diff in a file named FILE-OLD-NEW.diff. 30diff in a file named FILE-OLD-NEW.diff.
31 31
@@ -48,7 +48,7 @@ USAGE
48$file = shift @ARGV; 48$file = shift @ARGV;
49$old = shift @ARGV; 49$old = shift @ARGV;
50 50
51sub diffit 51sub diffit
52{ 52{
53 my ($old, $new) = @_; 53 my ($old, $new) = @_;
54 print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n"; 54 print "cvs diff -r$old -r$new $file >$file-$old-$new.diff\n";
@@ -64,9 +64,9 @@ sub current_revision ($)
64 die "Can't find $entries" unless -f $entries; 64 die "Can't find $entries" unless -f $entries;
65 open (IN, "<$entries") or die "Cannot open $entries"; 65 open (IN, "<$entries") or die "Cannot open $entries";
66 my $rev; 66 my $rev;
67 while ($line = <IN>) 67 while ($line = <IN>)
68 { 68 {
69 if ($line =~ m,/$base/([^/]+),) 69 if ($line =~ m,/$base/([^/]+),)
70 { 70 {
71 $rev = $1; 71 $rev = $1;
72 break; 72 break;
@@ -81,7 +81,7 @@ if ($old eq "-")
81 { 81 {
82 $old = current_revision ($file); 82 $old = current_revision ($file);
83 } 83 }
84elsif ($old =~ /^-(\d+)$/) 84elsif ($old =~ /^-(\d+)$/)
85 { 85 {
86 my $offset = $1; 86 my $offset = $1;
87 $old = current_revision ($file); 87 $old = current_revision ($file);
@@ -90,15 +90,15 @@ elsif ($old =~ /^-(\d+)$/)
90 $old = sprintf ("%d.%d", $1, $minor); 90 $old = sprintf ("%d.%d", $1, $minor);
91 } 91 }
92 92
93while (@ARGV) 93while (@ARGV)
94 { 94 {
95 my $new = shift @ARGV; 95 my $new = shift @ARGV;
96 if ($new =~ /^[+]\d+$/) 96 if ($new =~ /^[+]\d+$/)
97 { 97 {
98 my $n = $new; 98 my $n = $new;
99 for ($i = 0; $i < $n; ++$i) 99 for ($i = 0; $i < $n; ++$i)
100 { 100 {
101 unless ($old =~ /(.*)\.(\d+)$/) 101 unless ($old =~ /(.*)\.(\d+)$/)
102 { 102 {
103 die "Internal error"; 103 die "Internal error";
104 } 104 }
@@ -107,13 +107,13 @@ while (@ARGV)
107 diffit ($old, $new); 107 diffit ($old, $new);
108 $old = $new; 108 $old = $new;
109 } 109 }
110 } 110 }
111 elsif ($new =~ /^[-]\d+$/) 111 elsif ($new =~ /^[-]\d+$/)
112 { 112 {
113 my $n = - $new; 113 my $n = - $new;
114 for ($i = 0; $i < $n; ++$i) 114 for ($i = 0; $i < $n; ++$i)
115 { 115 {
116 unless ($old =~ /(.*)\.(\d+)$/) 116 unless ($old =~ /(.*)\.(\d+)$/)
117 { 117 {
118 die "Internal error"; 118 die "Internal error";
119 } 119 }
@@ -123,7 +123,7 @@ while (@ARGV)
123 $old = $new; 123 $old = $new;
124 } 124 }
125 } 125 }
126 else 126 else
127 { 127 {
128 diffit ($old, $new); 128 diffit ($old, $new);
129 $old = $new; 129 $old = $new;