Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jun 1996 18:14:55 -0700 (PDT)
From:      Sujal Patel <smpatel@umiacs.umd.edu>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        Heikki Suonsivu <hsu@clinet.fi>, freebsd-hackers@FreeBSD.org
Subject:   Re: Alternate lists for more verbose CVS commit messages? 
Message-ID:  <Pine.NEB.3.92.960630181047.1667A-100000@sujal.prognet.com>
In-Reply-To: <13317.836105910@time.cdrom.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 29 Jun 1996, Jordan K. Hubbard wrote:

> > I often would like to know more about problems certain commit might fix,
> > and see what modifications were committed.  Could it be possible to create
> > alternate commit lists which would receive detailed commit messages ?
> > Getting a full CVS diff would be helpful, if nothing else.
>
> Uh, what's wrong with simply subscribing to a cvs-* list and then
> cross-referencing the revision numbers mentioned with the
> http://www.freebsd.org/cgi-bin/cvsweb CGI script to get the diffs you
> want?

Or just pipe your piece of mail from cvs-* into the attached script and
you'll get an instant diff :-)  It works 98% of the time (gets confused on
some branch commits, added files, and imports).  If someone wants to make
this really work well, that'll be cool (It's good enough for me :-)


Sujal

-- Cut --
#!/usr/bin/perl

# FreeBSD cvs-* -> diff processor
# Author: Sujal Patel <smpatel@freebsd.org>
# This program is in the Public Domain


while (<>) {
	if (/^  ([\d.]*)\s*(\+\d* \-\d*)\s*([\S\/]*)\s*/) {
		$rev = $1;
		$changes = $2;
		$path = $3;

		if ($rev =~ /((\d*\.)+)(\d*)/) {
			if ($3 == 1) {
				printf ("\n *** Can't determine previous version of %s\n", $path);
				printf (" *** Skipping File\n\n");
				next;
			}
			$oldrev = sprintf ("$1%d", $3 - 1);
		}

		$line = sprintf("GET /cgi-bin/cvsweb/$path?r1=text&tr1=$oldrev&r2=text&tr2=$rev&f=i\n");

		$af_inet = 2;
		$sock_stream = 1;
		$sockaddr = 'S n a4 x8';

		chop($hostname = `hostname`);
		($name, $aliases, $proto) = getprotobyname('tcp');
		($name, $aliases, $type, $len, $thisaddr) =
			gethostbyname($hostname);
		($name, $aliases, $type, $len, $thataddr) =
			gethostbyname("www.FreeBSD.org");
		$this = pack($sockaddr, $af_inet, 0, $thisaddr);
		$that = pack($sockaddr, $af_inet, 80, $thataddr);

		socket(SOCK, $af_inet, $sock_stream, $proto) || die $!;
		bind(SOCK, $this) || die $!;
		connect(SOCK, $that) || die $!;

		select(SOCK); $| = 1; select(STDOUT);

		print SOCK $line;

		while (<SOCK>) {
			print;
		}
	}
}





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.92.960630181047.1667A-100000>