From: Sebastian Spaeth Date: Mon, 5 Sep 2011 13:53:45 +0000 (+0200) Subject: Merge branch 'master' of ssh://notmuchmail.org/git/notmuch X-Git-Tag: 0.8_rc0~3 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=09c0804c2d2e3eb52b4ee90e134a636f38bcb98b;hp=e2e0d487bab0d9b54172e73248b3099825de0479 Merge branch 'master' of ssh://notmuchmail.org/git/notmuch --- diff --git a/Makefile.local b/Makefile.local index e3d4d031..38f6c174 100644 --- a/Makefile.local +++ b/Makefile.local @@ -34,6 +34,8 @@ DEB_TAR_FILE=$(PACKAGE)_$(VERSION).orig.tar.gz SHA1_FILE=$(TAR_FILE).sha1 GPG_FILE=$(SHA1_FILE).asc +PV_FILE=bindings/python/notmuch/version.py + # Smash together user's values with our extra values FINAL_CFLAGS = -DNOTMUCH_VERSION=$(VERSION) $(CFLAGS) $(WARN_CFLAGS) $(CONFIGURE_CFLAGS) $(extra_cflags) FINAL_CXXFLAGS = $(CXXFLAGS) $(WARN_CXXFLAGS) $(CONFIGURE_CXXFLAGS) $(extra_cflags) $(extra_cxxflags) @@ -166,7 +168,7 @@ release-message: verify-source-tree-and-version: verify-no-dirty-code .PHONY: verify-no-dirty-code -verify-no-dirty-code: verify-version-debian +verify-no-dirty-code: verify-version-debian verify-version-python ifeq ($(IS_GIT),yes) @printf "Checking that source tree is clean..." ifneq ($(shell git ls-files -m),) @@ -192,6 +194,15 @@ verify-version-debian: verify-version-components fi @echo "Good." +.PHONY: verify-version-python +verify-version-python: verify-version-components + @echo -n "Checking that python bindings version is $(VERSION)..." + @if [ "$(VERSION)" != $$(python -c "execfile('$(PV_FILE)'); print __VERSION__") ] ; then \ + (echo "No." && \ + echo "Please edit version and $(PV_FILE) to have consistent versions." && false) \ + fi + @echo "Good." + .PHONY: verify-version-components verify-version-components: @echo -n "Checking that $(VERSION) consists only of digits and periods..." diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 274c5dab..8824b080 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -65,7 +65,7 @@ list." (defun notmuch-mua-add-more-hidden-headers () "Add some headers to the list that are hidden by default." (mapc (lambda (header) - (when (not (member header 'message-hidden-headers)) + (when (not (member header message-hidden-headers)) (push header message-hidden-headers))) notmuch-mua-hidden-headers)) diff --git a/lib/gen-version-script.sh b/lib/gen-version-script.sh index ec801966..76670d57 100644 --- a/lib/gen-version-script.sh +++ b/lib/gen-version-script.sh @@ -12,7 +12,7 @@ HEADER=$1 shift printf '{\nglobal:\n' -nm --defined $* | awk '$3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ +nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $3 ~ "Xapian.*Error" {print $3}' | sort | uniq | \ while read sym; do demangled=$(c++filt $sym) case $demangled in @@ -23,5 +23,6 @@ while read sym; do ;; esac done +nm $* | awk '$1 ~ "^[0-9a-fA-F][0-9a-fA-F]*$" && $2 == "T" && $3 ~ "^get(line|delim)$" {print $3 ";"}' sed -n 's/^[[:space:]]*\(notmuch_[a-z_]*\)[[:space:]]*(.*/ \1;/p' $HEADER printf "local: *;\n};\n" diff --git a/test/multipart b/test/multipart index 22c42c6a..ef859d19 100755 --- a/test/multipart +++ b/test/multipart @@ -6,7 +6,7 @@ cat < ${MAIL_DIR}/multipart From: Carl Worth To: cworth@cworth.org Subject: Multipart message -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: <87liy5ap00.fsf@yoom.home.cworth.org> MIME-Version: 1.0 @@ -23,7 +23,7 @@ Content-Disposition: inline From: Carl Worth To: cworth@cworth.org Subject: html message -Date: Tue, 05 Jan 2001 15:42:57 -0000 +Date: Fri, 05 Jan 2001 15:42:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: <87liy5ap01.fsf@yoom.home.cworth.org> MIME-Version: 1.0 @@ -61,7 +61,7 @@ cat < ${MAIL_DIR}/base64-part-with-crlf From: Carl Worth To: cworth@cworth.org Subject: Test message with a BASE64 encoded binary containing CRLF pair -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 User-Agent: Notmuch/0.5 (http://notmuchmail.org) Emacs/23.3.1 (i486-pc-linux-gnu) Message-ID: MIME-Version: 1.0 @@ -99,7 +99,7 @@ Carl Worth (2001-01-05) (attachment inbox signed unread) Subject: Multipart message From: Carl Worth To: cworth@cworth.org -Date: Tue, 05 Jan 2001 15:43:57 -0000 +Date: Fri, 05 Jan 2001 15:43:57 +0000 header} body{ part{ ID: 1, Content-type: multipart/signed @@ -127,18 +127,9 @@ Non-text part: application/pgp-signature EOF test_expect_equal_file OUTPUT EXPECTED -test_begin_subtest "--format=text --part=0, full message" -notmuch show --format=text --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT +test_begin_subtest "--format=text --part=1, message body" +notmuch show --format=text --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org' >OUTPUT cat <EXPECTED - message{ id:87liy5ap00.fsf@yoom.home.cworth.org depth:0 match:1 filename:${MAIL_DIR}/multipart - header{ -Carl Worth (2001-01-05) (attachment inbox signed unread) -Subject: Multipart message -From: Carl Worth -To: cworth@cworth.org -Date: Tue, 05 Jan 2001 15:43:57 -0000 - header} - body{ part{ ID: 1, Content-type: multipart/signed part{ ID: 2, Content-type: multipart/mixed part{ ID: 3, Content-type: message/rfc822 @@ -159,8 +150,6 @@ And this message is signed. Non-text part: application/pgp-signature part} part} - body} - message} EOF test_expect_equal_file OUTPUT EXPECTED @@ -241,7 +230,7 @@ test_expect_success \ test_begin_subtest "--format=json --part=0, full message" output=$(notmuch show --format=json --part=0 'id:87liy5ap00.fsf@yoom.home.cworth.org') test_expect_equal "$output" \ -'{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "'"${MAIL_DIR}/multipart"'", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Tue, 05 Jan 2001 15:43:57 -0000"}, "body": [{"id": 1, "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, {"id": 7, "content-type": "application/pgp-signature"}]}]}' +'{"id": "87liy5ap00.fsf@yoom.home.cworth.org", "match": true, "filename": "'"${MAIL_DIR}/multipart"'", "timestamp": 978709437, "date_relative": "2001-01-05", "tags": ["attachment","inbox","signed","unread"], "headers": {"Subject": "Multipart message", "From": "Carl Worth ", "To": "cworth@cworth.org", "Cc": "", "Bcc": "", "Date": "Fri, 05 Jan 2001 15:43:57 +0000"}, "body": [{"id": 1, "content-type": "multipart/signed", "content": [{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}, {"id": 7, "content-type": "application/pgp-signature"}]}]}' test_begin_subtest "--format=json --part=1, message body" output=$(notmuch show --format=json --part=1 'id:87liy5ap00.fsf@yoom.home.cworth.org') @@ -252,13 +241,11 @@ test_begin_subtest "--format=json --part=2, multipart/mixed" output=$(notmuch show --format=json --part=2 'id:87liy5ap00.fsf@yoom.home.cworth.org') test_expect_equal "$output" \ '{"id": 2, "content-type": "multipart/mixed", "content": [{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}, {"id": 5, "content-type": "text/plain", "filename": "attachment", "content": "This is a text attachment.\n"}, {"id": 6, "content-type": "text/plain", "content": "And this message is signed.\n\n-Carl\n"}]}' -test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--format=json --part=3, rfc822 multipart" output=$(notmuch show --format=json --part=3 'id:87liy5ap00.fsf@yoom.home.cworth.org') test_expect_equal "$output" \ '{"id": 3, "content-type": "message/rfc822", "content": [{"id": 4, "content-type": "text/html"}]}' -test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "--format=json --part=4, html part" output=$(notmuch show --format=json --part=4 'id:87liy5ap00.fsf@yoom.home.cworth.org') @@ -393,7 +380,7 @@ To: Carl Worth , cworth@cworth.org In-Reply-To: <87liy5ap00.fsf@yoom.home.cworth.org> References: <87liy5ap00.fsf@yoom.home.cworth.org> -On Tue, 05 Jan 2001 15:43:57 -0000, Carl Worth wrote: +On Fri, 05 Jan 2001 15:43:57 +0000, Carl Worth wrote: Non-text part: multipart/signed Non-text part: multipart/mixed Non-text part: message/rfc822