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

Re: PATCH: AIX dep.&doc fix; development guidelines



On Apr 7,  9:04pm, Peter Stephenson wrote:
} Subject: Re: PATCH: AIX dep.&doc fix; development guidelines
}
} Bart Schaefer wrote:
} > At the time an actual release is done, will the maintainer (hi, Peter)
} > please do a sweep of the ChangeLog and convert all the "zefram1XX" etc.
} > into the actual article numbers?
} 
} Ouch. Script?

Hrm.  Aassuming you have a directory ~/zsh-workers/mla/ in which you've
unpacked all the tarfiles from the mailing list archive, so that you
have files named for the article numbers, it should go something like:

-------------------------------------------------------------------
#! /usr/bin/perl
open(CHANGELOG, "ChangeLog") or die "can't open ChangeLog";

rename("ChangeLog","ChangeLog.orig") and open(STDOUT, ">ChangeLog")
  or die "can't rewrite ChangeLog";

chdir("$ENV{'HOME'}/zsh-workers/mla")
  or die "can't cd to mailing list archive";

while (<CHANGELOG>) {
  if (/^\s+\* \b(\D\w+\B\d+:)/) {
    open(ARTICLES, "fgrep -l $1 * |"
      or die "can't grep mailing list archive";
    @articles = sort {$b <=> $a} <ARTICLES>;
    close(ARTICLES);
    $article = unshift @articles;
    s/$1/$article:/;
  }
} continue {
  print;
}
-------------------------------------------------------------------

This picks out the most recent article that references the sequence code,
which relies on the last mention of a sequence code like "zefram1"
appearing in the actual patch article.  If somebody has quoted Zefram's
ChangeLog diff in a later article, it'll find that article instead.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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