summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-10-27 12:10:32 +0000
committerRüdiger Timm <rt@openoffice.org>2003-10-27 12:10:32 +0000
commite4f09d9b1c618bed30724d246d07dad300da9a1d (patch)
treea839957965de56389fd328382a932357ce59a8f4 /solenv
parent8b1c84da6650c1ec2851769f0041efce49e8a164 (diff)
INTEGRATION: CWS geordi2q07 (1.11.72); FILE MERGED
2003/10/20 14:14:33 rt 1.11.72.1: #111934#: join CWS basepp1.
Diffstat (limited to 'solenv')
-rw-r--r--solenv/bin/modules/Cvs.pm30
1 files changed, 28 insertions, 2 deletions
diff --git a/solenv/bin/modules/Cvs.pm b/solenv/bin/modules/Cvs.pm
index 5352c53b6c45..371f84491f31 100644
--- a/solenv/bin/modules/Cvs.pm
+++ b/solenv/bin/modules/Cvs.pm
@@ -2,9 +2,9 @@
#
# $RCSfile: Cvs.pm,v $
#
-# $Revision: 1.11 $
+# $Revision: 1.12 $
#
-# last change: $Author: hr $ $Date: 2003-03-27 11:47:56 $
+# last change: $Author: rt $ $Date: 2003-10-27 13:10:32 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -448,6 +448,32 @@ sub status
$sticky_date, $sticky_options);
}
+# Return a diff between two revision of an archive.
+sub diff
+{
+ my $self = shift;
+ my $rev1 = shift;
+ my $rev2 = shift;
+ my $options = shift || '';
+
+ my $file = $self->name();
+ my ($nofile, $unkowntagfailure, $unkownrevfailure, $connectionfailure);
+
+ open (CVSDIFF, "$self->{CVS_BINARY} diff $options -r$rev1 -r$rev2 $file 2>&1 |");
+ my @diff = <CVSDIFF>;
+ close(CVSDIFF);
+
+ foreach (@diff){
+ /\[diff aborted\]: connect to/ && ++$connectionfailure;
+ /cvs \[server aborted\]: no such tag \w+/ && ++$unkowntagfailure;
+ /cvs server: tag [\d\.]+ is not in file $file/ && ++$unkownrevfailure;
+ }
+
+ return 'connectionfailure' if $connectionfailure;
+ return 'unkowntagfailiure' if $unkowntagfailure;
+ return 'unkownrevfailiure' if $unkownrevfailure;
+ return wantarray ? @diff : \@diff;
+}
#### private methods ####
sub parse_log
{