Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

CVS again (Re: Module idea to help developers)



Bart Schaefer (schaefer@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> I agree, but that presupposes a CVS archive, which we've made no progress
> on establishing over the last two or three months that it's been under
> serious consideration.  The Sunsite Denmark folks are completely silent
> (I don't think they're even looking at the zsh-*-owner mail right now)
> and PWS is apparently offline for an indeterminate time.  I was hoping
> for something quick but effective in the meantime.

I have access to a well-specced and reliable RedHat box with a
high-bandwidth connection in the UK, use of which as a temporary
zsh-workers CVS facility would be welcome.  Then when the Sunsite
people re-emerge, it could be moved there if so desired.

Oliver Kiddle (opk@xxxxxxxxxxxxx) wrote:
> How do you extract patches from e-mails - I'd be inclined to write a
> filter which takes the message header to grab the message number and
> puts it in a file.

I already did that:

-------- 8< -------- 8< --------
#!/usr/bin/perl -w

use strict;

use Mail::Util qw(read_mbox);
use Mail::Internet;

my $tmp_file = "/tmp/zsh.patch.delivery.$$";
my $dest_dir = '/home/localadams/IN/zsh-patches';

open(TMP, ">$tmp_file") or die $!;
print TMP <>;
close(TMP) or die $!;

my @msgs = read_mbox($tmp_file);

foreach my $msg (@msgs) {
  my $mail = new Mail::Internet $msg;
  if ($mail->head->get('From ') =~ /^zsh-workers-return-(\d+)/) {
    my $id = $1;
    my $dest = "$dest_dir/$id";
    if (-e $dest) {
      warn "File $dest already existed!  Skipping ...\n";
    }
    else {
      open(OUT, ">$dest_dir/$id") or die $!;
      $mail->print(\*OUT);
      close(OUT) or die $!;
    }
  }
  else {
    my $subject = $mail->head->get('Subject');
    warn "Couldn't get id from message `$subject'; discarding.\n";
  }  
}

unlink $tmp_file;

exit 0;
-------- 8< -------- 8< --------

(Temp file security risk ignored 'cos I wrote it for my laptop.)

I also automated the rpm-building process.

> It can then also cut out the patch.

Why bother?  It's nice to keep the text, and patch extracts the patch
automatically anyway.

> > and PWS is apparently offline for an indeterminate time.  I was hoping
> > for something quick but effective in the meantime.

Eek, I hadn't realised.

> If PWS is going to be away for a while then it might help a lot if
> someone else releases an intermediate release. 

Agreed.  Bart? :-)

> I rarely apply c-code patches because it's not normally a long wait
> to the next pws release but I had wanted to apply a couple of Sven's
> recent patches. I had little success with this so I'll either have
> to get all the patches from the archive or wait.

This should be a good kickstart excuse for getting a CVS repository
into action.



Messages sorted by: Reverse Date, Date, Thread, Author