Skip Menu |

This queue is for tickets about the activitymail CPAN distribution.

Report information
The Basics
Id: 49403
Status: open
Priority: 0/
Queue: activitymail

People
Owner: Nobody in particular
Requestors: snatarajan [...] venturiwireless.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Possible bug?
Date: Thu, 03 Sep 2009 12:03:33 -0700
To: bug-activitymail [...] rt.cpan.org
From: Shriram Natarajan <snatarajan [...] venturiwireless.com>
Good day, This is about: activitymail: v1.26 Perl version: v5.10.0 built for x86_64-linux-gnu-thread-multi uname -a: Linux cvs2 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux cvs version: Client: Concurrent Versions System (CVS) 1.12.13 (client/server) Server: Concurrent Versions System (CVS) 1.12.13 (client/server) Activitymail gets invoked during loginfo while adding a new directory (cvs add dirname). sub is_last_dir fails with: ######## activitymail error: Cannot open '/tmp/#cvs.lastdir.3576' for reading: No such file or directory My reading of activitymail says that is_last_dir should not get invoked and this should have exitted silently via parse_file_list --> $opt_n check. However the regular expression that loads up @revs seems to ignore the leading "-". A few lines after that there is a check whether $revs[0] is "-" and gives options for exit. "cvs -t" output snippet and version of activitymail obtained from github (and following make instructions) attached. What am I doing wrong? Or is this a bug? - With best regards, Shriram Natarajan Director of Engg Services & QA Venturi Wireless +14082155162 To engineer is human Information contained in this email may be confidential and any unauthorized use, disclosure, distribution, or copying of this information is strictly prohibited

Message body is not shown because sender requested not to inline it.

Download activitymail
application/x-perl 52k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Thu, 3 Sep 2009 23:10:54 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Sep 3, 2009, at 12:03 PM, Shriram Natarajan via RT wrote: Show quoted text
> Activitymail gets invoked during loginfo while adding a new directory > (cvs add dirname).
Are you also running it in commitinfo? You gotta do both. Show quoted text
> sub is_last_dir fails with: > ######## activitymail error: Cannot open '/tmp/#cvs.lastdir.3576' for > reading: No such file or directory
If you don't run it in commitinfo, it won't have created a file for it to find in loginfo. Show quoted text
> My reading of activitymail says that is_last_dir should not get > invoked > and this should have exitted silently via parse_file_list --> $opt_n > check.
How are you running it? What do you have in commitinfo and loginfo? Show quoted text
> However the regular expression that loads up @revs seems to ignore the > leading "-". A few lines after that there is a check whether > $revs[0] is > "-" and gives options for exit. "cvs -t" output snippet and version of > activitymail obtained from github (and following make instructions) > attached.
What lines are those? Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 04 Sep 2009 09:38:04 -0700
To: bug-activitymail [...] rt.cpan.org
From: Shriram Natarajan <snatarajan [...] venturiwireless.com>
Thank you for the prompt response. Show quoted text
> > sub is_last_dir fails with: > > ######## activitymail error: Cannot open '/tmp/#cvs.lastdir.3576'
> for
> > reading: No such file or directory
> > If you don't run it in commitinfo, it won't have created a file for > it > to find in loginfo.
Yes. It is in commitinfo as well. Attached are the relevant portions of commitinfo and loginfo. However "cvs add" does not launch commitinfo. That is the problem. Show quoted text
>
Show quoted text
> > However the regular expression that loads up @revs seems to ignore
> the
> > leading "-". A few lines after that there is a check whether
Show quoted text
> What lines are those?
activitymail:172: my @revs; if ($dir) { # CVS 1.12 command-line format. @revs = shift =~ /(\S+\s(?:[\d\.]+|NONE)\s(?:[\d\.]+| NONE))\s?/g; } else { # Deprecated command-line format. SNIPPED } my ($mod, @subdirs) = splitdir $dir; $mod = shift @subdirs unless defined $mod && $mod ne ''; DEBUG && dbpnt("Directory: '$dir'; Subdir: '" . catdir(@subdirs) . "'; Module: $mod\n"); if ($revs[0] eq '-') { # This is where I expect the script to go if it receives "- New directory NONE NONE" # There are checks for opt_n for new directories and another for imports. Best regards, Shriram

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 4 Sep 2009 12:49:32 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Sep 4, 2009, at 9:37 AM, Shriram Natarajan via RT wrote: Show quoted text
> Yes. It is in commitinfo as well. Attached are the relevant portions > of > commitinfo and loginfo. > > However "cvs add" does not launch commitinfo. That is the problem.
Ah, okay. Show quoted text
> if ($revs[0] eq '-') { > > # This is where I expect the script to go if it receives "- New > directory NONE NONE" > # There are checks for opt_n for new directories and another > for > imports.
I wonder if CVS changed the format. Can you stick a print STDERR "# ", join(', ' @revs), $/; In somewhere so we can see what's actually ending up in that array? Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 04 Sep 2009 15:43:41 -0700
To: bug-activitymail [...] rt.cpan.org
From: Shriram Natarajan <snatarajan [...] venturiwireless.com>
I had these lines in my activitymail: DEBUG && dbpnt("revs is $revs[0]\n"); my $output = join(",", @revs) . $/ . "\n"; DEBUG && dbpnt($output); Output when committing activitymail: @@@@@@@@ activitymail debug: revs is activitymail 1.59 1.60 @@@@@@@@ activitymail debug: activitymail 1.59 1.60 @@@@@@@@ activitymail debug: Directory: 'CVSROOT'; Subdir: ''; Module: CVSROOT @@@@@@@@ activitymail debug: activitymail => 1.59 => 1.60 (activitymail) @@@@@@@@ activitymail debug: Dir is :CVSROOT ; mod is CVSROOT. Output when "cvs add" ing a new directory: @@@@@@@@ activitymail debug: revs is directory NONE NONE @@@@@@@@ activitymail debug: directory NONE NONE @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: 'dirra'; Module: junk @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/directory) @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk. - With best regards, Shriram Natarajan Director of Engg Services & QA Venturi Wireless +14082155162 To engineer is human Information contained in this email may be confidential and any unauthorized use, disclosure, distribution, or copying of this information is strictly prohibited On Fri, 2009-09-04 at 12:50 -0700, David Wheeler via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > On Sep 4, 2009, at 9:37 AM, Shriram Natarajan via RT wrote: >
> > Yes. It is in commitinfo as well. Attached are the relevant
> portions
> > of > > commitinfo and loginfo. > > > > However "cvs add" does not launch commitinfo. That is the problem.
> > Ah, okay. >
> > if ($revs[0] eq '-') { > > > > # This is where I expect the script to go if it receives "-
> New
> > directory NONE NONE" > > # There are checks for opt_n for new directories and another > > for > > imports.
> > I wonder if CVS changed the format. Can you stick a > > print STDERR "# ", join(', ' @revs), $/; > > In somewhere so we can see what's actually ending up in that array? > > Best, > > David > > > >
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 4 Sep 2009 20:25:13 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
On Sep 4, 2009, at 3:43 PM, Shriram Natarajan via RT wrote: Show quoted text
> Output when committing activitymail: > > @@@@@@@@ activitymail debug: revs is activitymail 1.59 1.60 > @@@@@@@@ activitymail debug: activitymail 1.59 1.60 > > @@@@@@@@ activitymail debug: Directory: 'CVSROOT'; Subdir: ''; Module: > CVSROOT > @@@@@@@@ activitymail debug: activitymail => 1.59 => 1.60 > (activitymail) > @@@@@@@@ activitymail debug: Dir is :CVSROOT ; mod is CVSROOT. > > > Output when "cvs add" ing a new directory: > > @@@@@@@@ activitymail debug: revs is directory NONE NONE > @@@@@@@@ activitymail debug: directory NONE NONE > > @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: 'dirra'; > Module: junk > @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/ > directory) > @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk.
So was "-" changed to "directory"? Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Sat, 5 Sep 2009 09:50:17 -0700
To: <bug-activitymail [...] rt.cpan.org>
From: "Shriram Natarajan" <snatarajan [...] venturiwireless.com>
"- New" got dropped. Sent from handheld. e&o.e Show quoted text
----- Original Message ----- From: David Wheeler via RT <bug-activitymail@rt.cpan.org> To: Shriram Natarajan Sent: Fri Sep 04 20:25:46 2009 Subject: Re: [rt.cpan.org #49403] Possible bug? <URL: https://rt.cpan.org/Ticket/Display.html?id=49403 > On Sep 4, 2009, at 3:43 PM, Shriram Natarajan via RT wrote:
> Output when committing activitymail: > > @@@@@@@@ activitymail debug: revs is activitymail 1.59 1.60 > @@@@@@@@ activitymail debug: activitymail 1.59 1.60 > > @@@@@@@@ activitymail debug: Directory: 'CVSROOT'; Subdir: ''; Module: > CVSROOT > @@@@@@@@ activitymail debug: activitymail => 1.59 => 1.60 > (activitymail) > @@@@@@@@ activitymail debug: Dir is :CVSROOT ; mod is CVSROOT. > > > Output when "cvs add" ing a new directory: > > @@@@@@@@ activitymail debug: revs is directory NONE NONE > @@@@@@@@ activitymail debug: directory NONE NONE > > @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: 'dirra'; > Module: junk > @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/ > directory) > @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk.
So was "-" changed to "directory"? Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Tue, 8 Sep 2009 15:32:28 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
On Sep 5, 2009, at 9:50 AM, Shriram Natarajan via RT wrote: Show quoted text
> "- New" got dropped.
Still trying to understand here (I've not used CVS in years, sorry to be dense). If you enable debugging (-D), what is the output? Best, David
Subject: RE: [rt.cpan.org #49403] Possible bug?
Date: Tue, 8 Sep 2009 15:47:57 -0700
To: <bug-activitymail [...] rt.cpan.org>
From: "Shriram Natarajan" <snatarajan [...] venturiwireless.com>
All the output I have been sending you (e.g. below) is from (-D) Show quoted text
> Output when "cvs add" ing a new directory: > > @@@@@@@@ activitymail debug: revs is directory NONE NONE > @@@@@@@@ activitymail debug: directory NONE NONE > > @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: 'dirra'; > Module: junk > @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/ > directory) > @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk.
Wbr Shriram Show quoted text
-----Original Message----- From: David Wheeler via RT [mailto:bug-activitymail@rt.cpan.org] Sent: Tuesday, September 08, 2009 3:33 PM To: Shriram Natarajan Subject: Re: [rt.cpan.org #49403] Possible bug? <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > On Sep 5, 2009, at 9:50 AM, Shriram Natarajan via RT wrote:
> "- New" got dropped.
Still trying to understand here (I've not used CVS in years, sorry to be dense). If you enable debugging (-D), what is the output? Best, David
Subject: RE: [rt.cpan.org #49403] Possible bug?
Date: Tue, 15 Sep 2009 10:24:10 -0700
To: <bug-activitymail [...] rt.cpan.org>
From: "Shriram Natarajan" <snatarajan [...] venturiwireless.com>
Would it be easier if we could talk (phone or IM) and debug this? Wbr, Shriram (408) 2155162 IM: sanga_work@yahoo.com Show quoted text
-----Original Message----- From: David Wheeler via RT [mailto:bug-activitymail@rt.cpan.org] Sent: Tuesday, September 08, 2009 3:33 PM To: Shriram Natarajan Subject: Re: [rt.cpan.org #49403] Possible bug? <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > On Sep 5, 2009, at 9:50 AM, Shriram Natarajan via RT wrote:
> "- New" got dropped.
Still trying to understand here (I've not used CVS in years, sorry to be dense). If you enable debugging (-D), what is the output? Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 9 Oct 2009 16:12:15 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <david [...] kineticode.com>
What's in @revs at line 195? Best, David On Sep 8, 2009, at 3:48 PM, Shriram Natarajan via RT wrote: Show quoted text
> Queue: activitymail > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > All the output I have been sending you (e.g. below) is from (-D) >
>> Output when "cvs add" ing a new directory: >> >> @@@@@@@@ activitymail debug: revs is directory NONE NONE >> @@@@@@@@ activitymail debug: directory NONE NONE >> >> @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: >> 'dirra'; >> Module: junk >> @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/ >> directory) >> @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk.
> > Wbr > Shriram > > -----Original Message----- > From: David Wheeler via RT [mailto:bug-activitymail@rt.cpan.org] > Sent: Tuesday, September 08, 2009 3:33 PM > To: Shriram Natarajan > Subject: Re: [rt.cpan.org #49403] Possible bug? > > <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > On Sep 5, 2009, at 9:50 AM, Shriram Natarajan via RT wrote: >
>> "- New" got dropped.
> > Still trying to understand here (I've not used CVS in years, sorry to > be dense). If you enable debugging (-D), what is the output? > > Best, > > David > >
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 09 Oct 2009 17:09:17 -0700
To: bug-activitymail [...] rt.cpan.org
From: Shriram Natarajan <snatarajan [...] venturiwireless.com>
Code around that point: DEBUG && dbpnt("revs is $revs[0]\n"); my $output = join(",", @revs) . $/ . "\n"; DEBUG && dbpnt($output); Output: @@@@@@@@ activitymail debug: revs is directory NONE NONE @@@@@@@@ activitymail debug: directory NONE NONE Wbr, Shriram On Fri, 2009-10-09 at 16:12 -0700, David Wheeler via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > What's in @revs at line 195? > > Best, > > David > > On Sep 8, 2009, at 3:48 PM, Shriram Natarajan via RT wrote: >
> > Queue: activitymail > > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > > > All the output I have been sending you (e.g. below) is from (-D) > >
> >> Output when "cvs add" ing a new directory: > >> > >> @@@@@@@@ activitymail debug: revs is directory NONE NONE > >> @@@@@@@@ activitymail debug: directory NONE NONE > >> > >> @@@@@@@@ activitymail debug: Directory: 'junk/dirra'; Subdir: > >> 'dirra'; > >> Module: junk > >> @@@@@@@@ activitymail debug: directory => NONE => NONE (dirra/ > >> directory) > >> @@@@@@@@ activitymail debug: Dir is :junk/dirra ; mod is junk.
> > > > Wbr > > Shriram > > > > -----Original Message----- > > From: David Wheeler via RT [mailto:bug-activitymail@rt.cpan.org] > > Sent: Tuesday, September 08, 2009 3:33 PM > > To: Shriram Natarajan > > Subject: Re: [rt.cpan.org #49403] Possible bug? > > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=49403 > > > > > On Sep 5, 2009, at 9:50 AM, Shriram Natarajan via RT wrote: > >
> >> "- New" got dropped.
> > > > Still trying to understand here (I've not used CVS in years, sorry
> to
> > be dense). If you enable debugging (-D), what is the output? > > > > Best, > > > > David > > > >
> > > >
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Fri, 9 Oct 2009 18:51:05 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Oct 9, 2009, at 5:09 PM, Shriram Natarajan via RT wrote: Show quoted text
> Queue: activitymail > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=49403 > > > Code around that point: > > DEBUG && dbpnt("revs is $revs[0]\n"); > my $output = join(",", @revs) . $/ . "\n"; > DEBUG && dbpnt($output); > > Output: > @@@@@@@@ activitymail debug: revs is directory NONE NONE > @@@@@@@@ activitymail debug: directory NONE NONE
Crimony. Is the "-" removed from all status messages? D
Subject: RE: [rt.cpan.org #49403] Possible bug?
Date: Mon, 12 Oct 2009 08:35:36 -0700
To: <bug-activitymail [...] rt.cpan.org>
From: "Shriram Natarajan" <snatarajan [...] venturiwireless.com>
"cvs add newdir" is the only command that creates this special "- directory NONE NONE" type message. And the regex does not look for (/retain) the leading "-". So the portion of code looking for the leading "-" never gets executed. Afterwards things go downhill -- the script is looking for the tmp file that never got created and errors out. Wbr, Shriram Show quoted text
-----Original Message----- From: David Wheeler via RT [mailto:bug-activitymail@rt.cpan.org] Sent: Friday, October 09, 2009 6:51 PM To: Shriram Natarajan Subject: Re: [rt.cpan.org #49403] Possible bug? <URL: https://rt.cpan.org/Ticket/Display.html?id=49403 > On Oct 9, 2009, at 5:09 PM, Shriram Natarajan via RT wrote:
> Queue: activitymail > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=49403 > > > Code around that point: > > DEBUG && dbpnt("revs is $revs[0]\n"); > my $output = join(",", @revs) . $/ . "\n"; > DEBUG && dbpnt($output); > > Output: > @@@@@@@@ activitymail debug: revs is directory NONE NONE > @@@@@@@@ activitymail debug: directory NONE NONE
Crimony. Is the "-" removed from all status messages? D
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Mon, 12 Oct 2009 12:23:13 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Oct 12, 2009, at 8:35 AM, Shriram Natarajan via RT wrote: Show quoted text
> "cvs add newdir" is the only command that creates this special "- > directory NONE NONE" type message. And the regex does not look for (/ > retain) the leading "-". So the portion of code looking for the > leading "-" never gets executed. Afterwards things go downhill -- > the script is looking for the tmp file that never got created and > errors out.
Okay, so it sounds like the "-" is still there but activitymail is ignoring it, yes? Does changing line 175 to this help? @revs = shift =~ /(?:(-)\s)?(\S+\s(?:[\d\.]+|NONE)\s(?:[\d\.] +|NONE))\s?/g; Best, David
Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Mon, 12 Oct 2009 13:39:43 -0700
To: bug-activitymail [...] rt.cpan.org
From: Shriram Natarajan <snatarajan [...] venturiwireless.com>
Nope. That did not parse out the values properly. Output below: Use of uninitialized value $revs[0] in concatenation (.) or string at /home/cvs/CVSROOT/activitymail line 198. @@@@@@@@ activitymail debug: revs is Use of uninitialized value $revs[0] in join or string at /home/cvs/CVSROOT/activitymail line 199. @@@@@@@@ activitymail debug: ,directory NONE NONE Attached here is my "fix" for this case -- works for me. a) Look for the leading dash in the message. Set a flag ($isdash) b) If $isdash, exit without doing anything Here is what the output looks like: [snatarajan@machine junk]$ MYDIR="dir_blah_27"; mkdir $MYDIR; cvs add -m "adding dummy directory" $MYDIR; @@@@@@@@ activitymail debug: Dash found @@@@@@@@ activitymail debug: revs is directory NONE NONE @@@@@@@@ activitymail debug: directory NONE NONE @@@@@@@@ activitymail debug: Directory: 'junk/dir_blah_27'; Subdir: 'dir_blah_27'; Module: junk @@@@@@@@ activitymail debug: inside dash Directory /home/cvs/junk/dir_blah_27 added to the repository [snatarajan@machine junk]$ On Mon, 2009-10-12 at 12:23 -0700, David Wheeler via RT wrote: Show quoted text
> @revs = shift =~ /(?:(-)\s)?(\S+\s(?:[\d\.]+|NONE)\s(?:[\d\.] > +|NONE))\s?/g;

Message body is not shown because sender requested not to inline it.

Subject: Re: [rt.cpan.org #49403] Possible bug?
Date: Mon, 12 Oct 2009 14:31:32 -0700
To: bug-activitymail [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
On Oct 12, 2009, at 1:40 PM, Shriram Natarajan via RT wrote: Show quoted text
> Attached here is my "fix" for this case -- works for me. > a) Look for the leading dash in the message. Set a flag ($isdash) > b) If $isdash, exit without doing anything
Well, that just fixes the one situation. There might be commits with more revisions, in which case you don't want to exit. So I've changed it to this: if ($dir) { my $lv = shift; @revs = $lv =~ /(\S+\s(?:[\d\.]+|NONE)\s(?:[\d\.]+|NONE))\s?/g; unshift @revs, '-' if $lv =~ /^-/; Otherwise all is the same. But that won't work, either, because $revs [1] will be "directory NONE NONE". Is the "NONE NONE" bit new? Reading the code, it looks like it used to be just "directory". David