Skip Menu |

This queue is for tickets about the Rcs-Agent CPAN distribution.

Report information
The Basics
Id: 562
Status: open
Priority: 0/
Queue: Rcs-Agent

People
Owner: nick-perl [...] netability.ie
Requestors: millsb [...] logica.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.01
Fixed in: 1.05



Subject: diff fails if revision numbers are omitted
Distribition: Rcs-Agent-1.01 Perl version: 5.005_03 Operating system: Linux 2.2.14-5.0 (RedHat) Bug details: sub diff : documentation states that args 'revision1' and 'revision2' are optional, but the code reports "invalid revision number / tag supplied" if either is omitted. Patch attached that fixes this for me. I haven't tried it anywhere else.
--- Agent.pm Sun May 5 21:23:29 2002 +++ Agent.pm.v1.21 Tue Feb 19 18:02:43 2002 @@ -3,10 +3,6 @@ # An RCS frobnicator # # $Id: Agent.pm,v 1.21 2002/02/19 18:02:43 nick Exp $ -# -# ** Patched by B Mills, 2002/05/05: -# sub diff: allow 'revision1' and/or 'revision2' to be omitted from arg list -# ** End of Patch note package Rcs::Agent; @@ -601,8 +597,6 @@ } foreach my $rev ($args{revision1}, $args{revision2}) { - if (defined $rev) - { # We can either have a revision or a tag here unless (defined ($self->{revisions}->{$rev}) || defined ($self->{symbols}->{$rev})) { @@ -611,7 +605,6 @@ } $cmdargs .= " -r".shell_quote("$rev"); - } } my $command = "rcsdiff -q $cmdargs ".shell_quote($self->{rcsfile});
Show quoted text
> sub diff : documentation states that args 'revision1' and 'revision2' > are optional, but the code reports "invalid revision number / tag > supplied" if either is omitted.
Hmmm, you're right. I've put a slightly different patch in the main source tree and will release 1.02 some time during the week. Your patch is fine, btw, and the suggestion will be noted in the ChangeLog. Nick
I've just uploaded Rcs-Agent-1.02.tar.gz to CPAN. It should appear on mirrors over the next short while. Nick
From: DOUGW [...] cpan.org
I still get errors in 1.02 If I leave out both revisions, it can't find the working file since the rcsdiff command is not run from the working directory. I changed this (in diff()): ($exitcode, $stdout, $stderr) = $self->pipestderrout(command => $command); to this: ($exitcode, $stdout, $stderr) = $self->pipestderrout(command => $command, dir => $self->{workdir});