summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorwosch <wosch@FreeBSD.org>1996-06-30 11:51:41 +0000
committerwosch <wosch@FreeBSD.org>1996-06-30 11:51:41 +0000
commitfdfd212c01a8039095632c5a6ed0efcf0b969d28 (patch)
tree2e1816e854ba28fc764ffc6f0fba24e6108c2d5b /gnu/usr.bin
parent547a10923e41b0a1a6af8848c8ae82b57a063c74 (diff)
downloadFreeBSD-src-fdfd212c01a8039095632c5a6ed0efcf0b969d28.zip
FreeBSD-src-fdfd212c01a8039095632c5a6ed0efcf0b969d28.tar.gz
checklog - extract your commits from commitlogs archive
Diffstat (limited to 'gnu/usr.bin')
-rw-r--r--gnu/usr.bin/cvs/contrib/README1
-rw-r--r--gnu/usr.bin/cvs/contrib/checklog.pl34
2 files changed, 35 insertions, 0 deletions
diff --git a/gnu/usr.bin/cvs/contrib/README b/gnu/usr.bin/cvs/contrib/README
index e84b176..a999aed 100644
--- a/gnu/usr.bin/cvs/contrib/README
+++ b/gnu/usr.bin/cvs/contrib/README
@@ -88,3 +88,4 @@ Contents of this directory:
clmerge A perl script to handle merge conflicts in GNU
style ChangeLog files .
Contributed by Tom Tromey <tromey@busco.lanl.gov>.
+ checklog.pl extract your commits from commitlogs archive
diff --git a/gnu/usr.bin/cvs/contrib/checklog.pl b/gnu/usr.bin/cvs/contrib/checklog.pl
new file mode 100644
index 0000000..fab1c8f
--- /dev/null
+++ b/gnu/usr.bin/cvs/contrib/checklog.pl
@@ -0,0 +1,34 @@
+#!/usr/bin/perl
+# Copyright (c) Wolfram Schneider <wosch@freebsd.org>. June 1996, Berlin.
+#
+# checklog - extract your commits from commitlogs archive
+#
+# checklog username /a/cvs/CVSROOT/commitlogs/*[a-y]
+# zcat /a/cvs/CVSROOT/commitlogs/*.gz | checklog [username]
+#
+# $Id: checklog.pl,v 1.2 1996/06/27 12:54:25 wosch Exp $
+
+# your name or first argument
+if ($ARGV[0]) {
+ $name = $ARGV[0]; shift @ARGV;
+ warn "Is this really a username: `$name' ?\n"
+ unless $name =~ /^[a-z0-9]+$/;
+} else {
+ $name = `whoami`; chop $name;
+}
+
+# date string 96/02/18 10:44:59
+$date = '[0-9][0-9]/[0-9][0-9]/[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]';
+
+$flag = 0;
+while(<>) {
+ if (/^[a-z]/) { # start of a commit
+ if (m%^$name\s+$date$%o) { # it's *your* commit
+ $flag = 1;
+ } else {
+ $flag = 0;
+ }
+ }
+
+ print if $flag;
+}
OpenPOWER on IntegriCloud