]> git.ipfire.org Git - thirdparty/git.git/commitdiff
WI/WC script pair updates
authorJunio C Hamano <gitster@pobox.com>
Thu, 7 Aug 2008 01:38:56 +0000 (18:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 7 Aug 2008 01:38:56 +0000 (18:38 -0700)
UWC
WC
WI

diff --git a/UWC b/UWC
index 868b41ba28f389070ce429298a898ab604fb52fe..7391dedc9fe648f3eca85efc1d0cdb58f881b44d 100755 (executable)
--- a/UWC
+++ b/UWC
@@ -222,7 +222,7 @@ close FH;
 if (@ARGV > 1) {
        open FH, "$ARGV[1]";
 } else {
-       open FH, "Meta/WC |";
+       open FH, "Meta/WC generate |";
 }
 $new_wc = parse_whats_cooking(\*FH);
 close FH;
diff --git a/WC b/WC
index cd2fc89be8c96287a96a47112e783d50e6351547..6a16784fe3ee686acb3c7fff19da8bd2abe080c8 100755 (executable)
--- a/WC
+++ b/WC
@@ -4,18 +4,46 @@
 master_at=$(git rev-parse --verify refs/heads/master)
 next_at=$(git rev-parse --verify refs/heads/next)
 
+case "$1" in
+generate)
+       echo Here are the topics that have been
+       echo
+       Meta/git-topic.perl --base=master | sed -e 's/^\*./\n*/'
+       exit
+       ;;
+esac
+
+eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a")
+
+lead="whats/cooking/$year/$month"
+issue=$(
+       cd Meta &&
+       git ls-tree -r --name-only HEAD "$lead"  | tail -n 1
+)
+if test -n "$issue"
+then
+       issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' )
+       issue=$(( $issue + 1 ))
+else
+       issue=1
+fi
+issue=$( printf "%02d" $issue )
+mkdir -p "Meta/$lead"
+
+exec >"Meta/$lead/$issue.txt"
 
 cat <<EOF
-Subject: What's cooking in git.git (topics)
+Subject: What's cooking in git.git ($monthname $year, #$issue; $dow, $date)
 X-master-at: $master_at
 X-next-at: $next_at
 
-Here are the topics that have been cooking.  Commits prefixed
-with '-' are only in 'pu' while commits prefixed with '+' are
-in 'next'.  Others commits may be stashed in 'offcuts'.
-
-The topics list the commits in reverse chronological order.
+What's cooking in git.git ($monthname $year, #$issue; $dow, $date)
+--------------------------------------------------
 
 EOF
 
-Meta/git-topic.perl --base=master | sed -e 's/^\*./\n*/'
+last=$(
+       cd Meta &&
+       git ls-tree -r --name-only HEAD "whats/cooking"  | tail -n 1
+)
+Meta/UWC <"Meta/$last"
diff --git a/WI b/WI
index 83cfc4f9677c3922936fedd16529342d1f9272c2..cc8f6aa135f4fd44e3e4653cc1ca7c691f709069 100755 (executable)
--- a/WI
+++ b/WI
@@ -10,11 +10,44 @@ log () {
        git shortlog -w76,2,4 --no-merges "$@"
 }
 
-echo "Subject: What's in git.git (stable)"
-echo "X-maint-at: $maint_at"
-echo "X-master-at: $master_at"
-echo "X-maint-was: $maint_was"
-echo "X-master-was: $master_was"
+one () {
+       git show -s --pretty="format:%h (%s)" "$1"
+}
+
+eval $(LC_ALL=C date +"monthname=%b month=%m year=%Y date=%d dow=%a")
+
+lead="whats/in/$year/$month"
+issue=$(
+       cd Meta &&
+       git ls-tree -r --name-only HEAD "$lead"  | tail -n 1
+)
+if test -n "$issue"
+then
+       issue=$( expr "$issue" : '.*/0*\([1-9][0-9]*\)\.txt$' )
+       issue=$(( $issue + 1 ))
+else
+       issue=1
+fi
+issue=$( printf "%02d" $issue )
+
+mkdir -p "Meta/$lead"
+exec >"Meta/$lead/$issue.txt"
+
+cat <<EOF
+Subject: What's in git.git ($monthname $year, #$issue; $dow, $date)
+X-maint-at: $maint_at"
+X-master-at: $master_at"
+X-maint-was: $maint_was"
+X-master-was: $master_was"
+
+What's in git.git ($monthname $year, #$issue; $dow, $date)
+
+  maint $(one maint)
+ master $(one master)
+------------------------------------------------------------------------
+
+BLURB HERE
+EOF
 
 tagged=`git rev-parse --not --verify hold/sa/maint`
 list=`git rev-list $tagged refs/heads/maint 2>/dev/null`