From fb0f0031d39c7d58684753118a05afaaa1a44138 Mon Sep 17 00:00:00 2001 From: jkratoch <> Date: Sun, 17 Jan 2010 06:21:03 +0000 Subject: [PATCH] Support "-f" filtering for unChangeLogging. --- bin/changelogget | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bin/changelogget b/bin/changelogget index 59cc4e7..b59b87d 100755 --- a/bin/changelogget +++ b/bin/changelogget @@ -15,10 +15,12 @@ fi function formatpatch { # --- src/gdb/ChangeLog 2008/04/24 08:46:17 1.9308 - diffdecvs | if [ -z "$changelog" ];then perl -p -e '$c=1 if s{^(?:---|\Q+++\E)(?= \S+/ChangeLog\t)}{###};s{^@@}{##} if $c;'; else cat; fi + diffdecvs | if [ -z "$changelog" ];then perl -p -e '$r=qr/^(?:---|\Q+++\E) /o;$c=0 if m{$r}o;$c=1 if s{$r(?=\S+/ChangeLog(?:\t|$))}{### }o;s{^@@}{##} if $c;'; else cat; fi } -for arg in "$@";do +if [ "$*" = "-f" ];then + formatpatch +else for arg in "$@";do # http://sourceware.org/ml/gdb-cvs/2099-99/msg99999.html if [ "$arg" != "${arg#http://sources.redhat.com/}" ];then arg="http://sourceware.org/${arg#http://sources.redhat.com/}" @@ -53,7 +55,7 @@ for arg in "$@";do echo >&2 "Invalid URL: $arg" exit 1 fi -done +done;fi if $v;then echo >&2 OK fi -- 1.8.3.1