diff options
author | jmg <jmg@FreeBSD.org> | 2004-09-24 20:06:49 +0000 |
---|---|---|
committer | jmg <jmg@FreeBSD.org> | 2004-09-24 20:06:49 +0000 |
commit | b069886175c41e5c83ee8d48be5d571a917ebe17 (patch) | |
tree | 9214a201241912bfbb21fb56b71f8e1eb687efb9 /tools | |
parent | a4ba66f4dfcfc360b6a31e370c5d4c6735a9275c (diff) | |
download | FreeBSD-src-b069886175c41e5c83ee8d48be5d571a917ebe17.zip FreeBSD-src-b069886175c41e5c83ee8d48be5d571a917ebe17.tar.gz |
add my script that helps me handle MFC's. It takes in a commit message
and generates the proper (hopefully) update -j lines + commit line to do
the MFC... This has saved me a lot of time doing recent MFC's...
You still should use diff to verify the changes before doing the commit..
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/README | 2 | ||||
-rw-r--r-- | tools/tools/mfc/mfc.awk | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/tools/tools/README b/tools/tools/README index 8b0d279..3656067 100644 --- a/tools/tools/README +++ b/tools/tools/README @@ -36,7 +36,7 @@ kerninclude Shellscript to find unused #includes in the kernel. kernxref Shellscript to cross reference symbols in the LINT kernel. kttcp An in-kernel version of the ttcp network performance tool mfc Merge a directory from HEAD to a branch where it does not - already exist. + already exist and other MFC related script(s). mid Create a Message-ID database for mailing lists. pciid Generate src/share/misc/pci_vendors. portsinfo Generate list of new ports for last two weeks. diff --git a/tools/tools/mfc/mfc.awk b/tools/tools/mfc/mfc.awk new file mode 100644 index 0000000..f82c5c2 --- /dev/null +++ b/tools/tools/mfc/mfc.awk @@ -0,0 +1,30 @@ +#!/usr/bin/awk -f +# +# $FreeBSD$ +# + +BEGIN { + CVSROOT="ncvs:/home/ncvs" + UPDATEOPTS="-kk" +} + +/^>/ { + sub(">[ ]*", "") +} + +/^Revision/ || $1 == "" { + next +} + +{ + if (sub("1.", "") != 1) + next + if (!(match($2, "\\+[0-9]") && match($3, "-[0-9]"))) + next + printf("cvs -d %s update %s -j 1.%d -j 1.%d %s\n", CVSROOT, UPDATEOPTS, $1 - 1, $1, $4) + files = files " " $4 +} + +END { + printf("cvs -d %s commit %s\n", CVSROOT, files); +} |