From owner-cvs-all Tue Aug 8 0: 7: 7 2000 Delivered-To: cvs-all@freebsd.org Received: from gate.keisu.t.u-tokyo.ac.jp (gate.keisu.t.u-tokyo.ac.jp [133.11.68.1]) by hub.freebsd.org (Postfix) with ESMTP id 0C4A837B737; Tue, 8 Aug 2000 00:06:46 -0700 (PDT) (envelope-from simokawa@sat.t.u-tokyo.ac.jp) Received: from sylph.sat.t.u-tokyo.ac.jp (sylph.sat.t.u-tokyo.ac.jp [10.6.1.20]) by gate.keisu.t.u-tokyo.ac.jp (Postfix) with ESMTP id 4C3313D9D; Tue, 8 Aug 2000 16:06:31 +0900 (JST) Received: from localhost (ett.sat.t.u-tokyo.ac.jp [10.6.1.30]) by sylph.sat.t.u-tokyo.ac.jp (Postfix) with ESMTP id AEBA82DAAA; Tue, 8 Aug 2000 16:06:29 +0900 (JST) To: imp@village.org Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/games/fortune/datfiles fortunes In-Reply-To: <200008072226.QAA35123@harmony.village.org> References: <200008072049.NAA00374@freefall.freebsd.org> <200008072201.QAA34941@harmony.village.org> <200008072226.QAA35123@harmony.village.org> X-Face: OE([KxWyJI0r[R~S/>7ia}SJ)i%a,$-9%7{*yihQk|]gl}2p#"oXmX/fT}Bn7:#j7i14gu$ jgR\S*&C3R/pJX Date: Tue, 08 Aug 2000 16:06:28 +0900 From: Hidetoshi Shimokawa X-Dispatcher: imput version 20000414(IM141) Lines: 66 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: Warner Losh Subject: Re: cvs commit: src/games/fortune/datfiles fortunes Date: Mon, 07 Aug 2000 16:26:35 -0600 Message-ID: <200008072226.QAA35123@harmony.village.org> imp> In message <20000807171632.B514@FreeBSD.org> Ade Lovett writes: imp> : http://www.FreeBSD.org/cgi/cvsweb.cgi/src/games/fortune/datfiles/fortunes.diff?r1=1.41&r2=1.42 imp> imp> I'd love to see links like this in the commit message :-) imp> imp> Warner I use the following python script to get diff by cut&paste from interesting commit messages. #!/usr/local/bin/python # # fetch diff via cvsweb while reading commit messages # # example input: # 1.12 +2 -1 doc/share/sgml/man-refs.ent import re,urllib,sys,string repo_list = { # repository URL cvsroot "freebsd" : ("http://www.freebsd.org/cgi/cvsweb.cgi", "freebsd"), "freebsd-jp" : ("http://www.jp.freebsd.org/cgi/cvsweb", "freebsd-jp"), } repo = "freebsd" pat = re.compile("([\d.]+)\.(\d+)\s+\+\d+ -\d+\s+([^\s]+)") def process_line(i, url, cvsroot): match = pat.search(i) if match: major, minor, lpath = match.groups() minor = int(minor) if minor == 1: # branch point r1 = major[:string.rfind(major, ".")] else: r1 = "%s.%d" % (major, minor - 1) r2 = "%s.%d" % (major, minor) path = "%s/%s?r1=%s&r2=%s&cvsroot=%s" % ( url, lpath, r1, r2, cvsroot) print path f = urllib.urlopen(path) for j in f.readlines(): sys.stdout.write(j) f.close() print "=" * 68 if __name__ == "__main__": if len(sys.argv) > 1: repo = sys.argv.pop(1) url, cvsroot = repo_list[repo] while 1: l = sys.stdin.readline() if l: process_line(l, url, cvsroot) else: break /\ Hidetoshi Shimokawa \/ simokawa@sat.t.u-tokyo.ac.jp PGP public key: finger -l simokawa@sat.t.u-tokyo.ac.jp To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message