OSSP CVS Repository

ossp - Difference in ossp-pkg/shiela/shiela.pl versions 1.52 and 1.53
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/shiela/shiela.pl 1.52 -> 1.53

--- shiela.pl    2004/05/05 13:11:43     1.52
+++ shiela.pl    2004/05/06 19:45:39     1.53
@@ -212,7 +212,7 @@
     $RT->{cvsvers} = $1 if ($v =~ m|Concurrent\s+Versions\s+System\s+\(CVS\)\s+([\d.p]+)\s+|s);
     $RT->{cvsrse} = 0;
     $RT->{cvsrse} = 1 if ($v =~ m|\[RSE\]|s);
-    die "$RT->{cvs} is not at least CVS 1.10" if ($RT->{cvsvers} !~ m|^1\.1[0-9]|);
+    die "$RT->{cvs} is not at least CVS 1.12" if ($RT->{cvsvers} !~ m|^1\.1[2-9]|);
     $RT->{useserver} = 0;
     $RT->{useserver} = 1 if ($v =~ m|server|s);
 
@@ -1425,7 +1425,12 @@
     my ($PA, $RT, $CF) = @_;
 
     #   take the arguments
-    my ($cvsdir, @cvsinfo) = split(/\s+/, $PA->{ARG}->[0]);
+    my $cvsdir = $PA->{ARG}->[0];
+    my @cvsinfo = ();
+    my $k = ($RT->{cvsrse} ? 5 : 3);
+    for (my $i = 1; $i <= $#{$PA->{ARG}}; $i += $k) {
+        push(@cvsinfo, join(",", @{$PA->{ARG}}[$i..$i+$k-1]));
+    }
 
     #   suck in the standard log information which CVS provides
     my $cvsmsg = '';
@@ -1435,7 +1440,7 @@
     $RT->{cvsop} = 'commit-file';
 
     #   handle special invocation under `cvs add <dir>'
-    if (join(' ', @cvsinfo) eq '- New directory') { # see CVS' src/add.c
+    if ($PA->{ARG}->[1] eq '- New directory') { # see CVS' src/add.c
         #   Hmmm... we always just deal with files in OSSP shiela, so there
         #   is no obvious and consistent way to deal now with only a
         #   plain directory. And there is also no log message provided
@@ -1451,7 +1456,7 @@
     #   CVS only calls us inside the loginfo hook and never in the
     #   commitinfo hook before. Additionally CVS doesn't provide us with
     #   the %{sVvto} information :(
-    if (join(' ', @cvsinfo) eq '- Imported sources') { # see CVS' src/import.c
+    if ($PA->{ARG}->[1] eq '- Imported sources') { # see CVS' src/import.c
         #   I = ignored
         #   L = link (=error),
         #   N = new file
@@ -2245,6 +2250,7 @@
         elsif ($content eq 'details') {
             $O .= "\n";
             if ($style =~ m|^url:(.+)|) {
+                $O .= "Change details:\n";
                 my $urlspec = $1;
                 foreach $file (sort(keys(%{$IN->{file}}))) {
                     next if ($IN->{file}->{$file}->{op} eq 'T');
@@ -2254,17 +2260,26 @@
                         elsif ($1 eq 'V') { $IN->{file}->{$file}->{oldrev}; }
                         elsif ($1 eq 'v') { $IN->{file}->{$file}->{newrev}; }
                     |gse;
-                    $O .= "$prefix$url\n";
+                    $O .= "  $prefix$url\n";
                 }
             }
             elsif ($style eq 'rdiff') {
-                $O .= "To re-generate the difference summary of this commit, execute:\n";
+                $O .= "Change details:\n";
                 foreach $file (sort(keys(%{$IN->{file}}))) {
-                    $O .= "cvs rdiff -uN " .
-                          " -r" . $IN->{file}->{$file}->{oldrev} .
-                          " -r" . $IN->{file}->{$file}->{newrev} .
-                          " " . $file .
-                          "\n";
+                    next if ($IN->{file}->{$file}->{op} eq 'T');
+                    if ($IN->{file}->{$file}->{op} eq 'A') {
+                        $O .= "  \$ cvs rdiff -u" .
+                              " -r0 -r" . $IN->{file}->{$file}->{newrev} .
+                              " " . $file .
+                              "\n";
+                    }
+                    else {
+                        $O .= "  \$ cvs rdiff -u" .
+                              " -r" . $IN->{file}->{$file}->{oldrev} .
+                              " -r" . $IN->{file}->{$file}->{newrev} .
+                              " " . $file .
+                              "\n";
+                    }
                 }
             }
             elsif ($style eq 'patch:plain') {

CVSTrac 2.0.1