nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated


From: Ken Hornstein
Subject: [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb
Date: Mon, 27 Feb 2012 18:45:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".

The branch, master has been updated
       via  5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb (commit)
       via  1f9cbd73830742dc7039f53b8672d8a5aaf75c11 (commit)
       via  efa71a4135a711d8ab79809e635de4091ccf6013 (commit)
      from  dd404b3a868b38cdc9c7271778e7ec6591fb04a8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb


commit 5f1f8f86e1cc6d51ba77aed65ae78612a1e9e5cb
Author: Ken Hornstein <address@hidden>
Date:   Mon Feb 27 13:45:37 2012 -0500

    Got the forw -digest test working.

diff --git a/Makefile.am b/Makefile.am
index 0889486..aa775f7 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,7 +44,9 @@ TESTS = test/bad-input/test-header test/comp/test-comp-format 
\
        test/folder/test-create \
        test/folder/test-total test/format/test-localmbox \
        test/format/test-myname test/format/test-myhost \
-       test/format/test-mymbox test/forw/test-forw-format \
+       test/format/test-mymbox \
+       test/forw/test-forw-digest \
+       test/forw/test-forw-format \
        test/inc/test-deb359167 test/inc/test-eom-align \
        test/manpages/test-manpages test/mhbuild/test-forw \
        test/mhpath/test-mhpath \
diff --git a/test/forw/test-forw-digest b/test/forw/test-forw-digest
index 9d62fc8..6792a78 100755
--- a/test/forw/test-forw-digest
+++ b/test/forw/test-forw-digest
@@ -24,27 +24,94 @@ cc4="CC User Four <address@hidden>"
 fcc1="+nosuchmailbox"
 fcc2="+nosuchmailbox2"
 
+digestdate=$(date "+%A, %d %b %G")
+
 cat > "$expected" <<EOF
-From: ${from}
-To: ${to1}, ${to2}
-cc: ${cc1},
-    ${cc2},
-    ${cc3},
-    ${cc4}
+From:     ${from}
+To:       ${to1},
+          ${to2}
+cc:       ${cc1},
+          ${cc2},
+          ${cc3},
+          ${cc4}
 Fcc: ${fcc1}, ${fcc2}
-Subject: foo
+Subject:  digest-test Digest V2 #3
+Reply-To: digest-test
 --------
+digest-test Digest     $digestdate
+               Volume 2 : Issue 3
+
+Today's Topics:
 
+------------------------------------------------------------
 
 EOF
 
+i=1
+while [ "$i" -le 6 ]
+do
+    filename=$(mhpath +inbox $i)
+    cat $filename >> "$expected"
+    cat >> "$expected" <<EOF
+
+------------------------------
+
+EOF
+    i=$(expr $i + 1)
+done
+
+cat >> "$expected" <<EOF
+End of digest-test Digest [Volume 2 Issue 3]
+********************************************
+EOF
+
 forw -editor true -from "${from}" -to "${to1}" -to "${to2}" \
     -cc "${cc1}" -cc "${cc2}" -cc "${cc3}" -cc "${cc4}" -fcc "${fcc1}" \
-    -fcc "${fcc2}" -width 60 -nowhatnowproc 1 \
+    -fcc "${fcc2}" -width 60 -issue 3 -volume 2 -nowhatnowproc \
     -digest digest-test +inbox 1-6 || exit 1
 
 check "${expected}" "${actual}"
 
-test "${failed:-0}" -eq 0 && rm "${form}"
+#
+# Once more, but taking some of the defaults
+#
+
+cat > "$expected" <<EOF
+From:     ${from}
+To:       digest-test Distribution: dist-digest-test;
+Subject:  This is a test
+Reply-To: digest-test
+--------
+digest-test Digest     ${digestdate}
+               Volume 2 : Issue 4
+
+Today's Topics:
+
+------------------------------------------------------------
+
+EOF
+
+i=7
+while [ "$i" -le 8 ]
+do
+    filename=$(mhpath +inbox $i)
+    cat $filename >> "$expected"
+    cat >> "$expected" <<EOF
+
+------------------------------
+
+EOF
+    i=$(expr $i + 1)
+done
+
+cat >> "$expected" <<EOF
+End of digest-test Digest [Volume 2 Issue 4]
+********************************************
+EOF
+
+forw -editor true -from "${from}" -nowhatnowproc -digest digest-test \
+    -subject "This is a test" +inbox 7-8 || exit 1
+
+check "${expected}" "${actual}"
 
 exit $failed

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=1f9cbd73830742dc7039f53b8672d8a5aaf75c11


commit 1f9cbd73830742dc7039f53b8672d8a5aaf75c11
Author: Ken Hornstein <address@hidden>
Date:   Mon Feb 27 13:37:09 2012 -0500

    Update digestcomps and forwcomps with comments and better formatting.

diff --git a/etc/digestcomps b/etc/digestcomps
index 5b310d5..19d97ac 100644
--- a/etc/digestcomps
+++ b/etc/digestcomps
@@ -1,6 +1,18 @@
-%<{nmh-from}%(void(width))%(putaddr From:         )%|From:       
%{digest}-Request%>
-%<{nmh-to}%(void(width))%(putaddr To:     )%|To:         %{digest} 
Distribution: dist-%{digest};%>
-Subject:  %{digest} Digest V%(cur) #%(msg)
+%;
+%; digestcomps - the component template file used when doing "forw -digest"
+%;
+%; What happens here is the following:
+%;
+%; - Try to make reasonable defaults when using -digest
+%; - Allow users to override headers if they give them
+%;
+%; See forwcomps for more details on how this works
+%;
+%<{nmh-from}%(void(width))%(putaddr From:     )%|From:     %{digest}-Request%>
+%<{nmh-to}%(void(width))%(putaddr To:       )%|To:       %{digest} 
Distribution: dist-%{digest};%>
+%<{nmh-cc}%(void(width))%(putaddr cc:       )\n%>\
+%<{fcc}Fcc: %(putstr)\n%>\
+Subject:  %<{nmh-subject}%(putlit)%|%{digest} Digest V%(cur) #%(msg)%>
 Reply-To: %{digest}
 --------
 %{digest} Digest       %(weekday{nmh-date}), %2(mday{nmh-date}) 
%(month{nmh-date}) %(year{nmh-date})
diff --git a/etc/forwcomps b/etc/forwcomps
index fdfb23b..4d9f192 100644
--- a/etc/forwcomps
+++ b/etc/forwcomps
@@ -1,6 +1,32 @@
+%;
+%; forwcomps - Our components file when we're using "forw"
+%;
+%; We want people to be able to use the components from forwarded
+%; messages in this file, so we have to cheat a bit.  We create a series
+%; of pseudo-components with a "nmh" prefix to represent arguments given
+%; on the command line.  We don't do this for %{fcc} since there's already
+%; precedence for this from "repl".
+%;
+%; If we're given multiple messages to forward, provide the components
+%; from the first one.  Can't really think of anything better to do there.
+%;
+%; Generate a "From:" header; if we don't give one, use %(localmbox)
+%;
 %<{nmh-from}%|%(void(localmbox))%>%(void(width))%(putaddr From: )
+%;
+%; Generate To: and cc: headers; if we're given ones, put something in there
+%; otherwise leave them blank.
+%;
 %<{nmh-to}%(void(width))%(putaddr To: )%|To:%>
 %<{nmh-cc}%(void(width))%(putaddr cc: )%|cc:%>
+%;
+%; If we're not given a -fcc switch, then default to +outbox
+%;
 Fcc: %<{fcc}%(putstr)%|+outbox%>
+%;
+%; If we're not given a -subject switch, then use the original message
+%; subject, but adding (fwd) on the end.  I got this idea from exmh, and
+%; I've always liked it.
+%;
 Subject:%<{nmh-subject} %(trim)%(putlit)%?{subject} %(trim)%(putlit) (fwd)%>
 --------

http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=efa71a4135a711d8ab79809e635de4091ccf6013


commit efa71a4135a711d8ab79809e635de4091ccf6013
Author: Ken Hornstein <address@hidden>
Date:   Mon Feb 27 12:56:00 2012 -0500

    Make -volume switch actually work (it always got overridden).  As far
    as I can tell, this never worked.  Found by the test suite!

diff --git a/uip/forw.c b/uip/forw.c
index 3c3e4f6..22ecc00 100644
--- a/uip/forw.c
+++ b/uip/forw.c
@@ -430,10 +430,11 @@ try_it_again:
                issue = 0;
            issue++;
        }
-       if (volume == 0)
+       if (volume == 0) {
            snprintf (buf, sizeof(buf), VFORMAT, digest);
-       if ((cp = context_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
-           volume = 1;
+           if ((cp = context_find (buf)) == NULL || (volume = atoi (cp)) <= 0)
+               volume = 1;
+       }
        if (!form)
            form = digestcomps;
     } else {

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am                |    4 ++-
 etc/digestcomps            |   18 ++++++++--
 etc/forwcomps              |   26 +++++++++++++
 test/forw/test-forw-digest |   85 +++++++++++++++++++++++++++++++++++++++-----
 uip/forw.c                 |    7 ++--
 5 files changed, 124 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
The nmh Mail Handling System



reply via email to

[Prev in Thread] Current Thread [Next in Thread]