From: David Bremner Date: Mon, 21 Nov 2011 11:26:11 +0000 (-0400) Subject: Merge branch 'release' X-Git-Tag: 0.11_rc1~118 X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=commitdiff_plain;h=bdf38b5e0fb9674d482c439c1cdb077cd16cdc96;hp=eb88cd977bcfecfc2d4eb16547d21deb839fbae0 Merge branch 'release' --- diff --git a/Makefile.local b/Makefile.local index 8b42136a..775f3935 100644 --- a/Makefile.local +++ b/Makefile.local @@ -12,16 +12,18 @@ PACKAGE=notmuch IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi) +ifeq ($(IS_GIT),yes) +DATE:=$(shell git log --date=short -1 --pretty=format:%cd) +else +DATE:=$(shell date +%F) +endif + VERSION:=$(shell cat ${srcdir}/version) -ifneq ($(MAKECMDGOALS),release) -ifneq ($(MAKECMDGOALS),release-message) -ifneq ($(MAKECMDGOALS),pre-release) +ifeq ($(filter release release-message pre-release update-versions,$(MAKECMDGOALS)),) ifeq ($(IS_GIT),yes) VERSION:=$(shell git describe --match '[0-9.]*'|sed -e s/_/~/ -e s/-/+/ -e s/-/~/) endif endif -endif -endif UPSTREAM_TAG=$(subst ~,_,$(VERSION)) DEB_TAG=debian/$(UPSTREAM_TAG)-1 @@ -91,6 +93,12 @@ $(GPG_FILE): $(SHA1_FILE) .PHONY: dist dist: $(TAR_FILE) +.PHONY: update-versions + +update-versions: + sed -i "s/^.TH NOTMUCH 1.*$$/.TH NOTMUCH 1 ${DATE} \"Notmuch ${VERSION}\"/" notmuch.1 + sed -i "s/^__VERSION__[[:blank:]]*=.*$$/__VERSION__ = \'${VERSION}\'/" $(PV_FILE) + # We invoke make recursively only to force ordering of our phony # targets in the case of parallel invocation of make (-j). # diff --git a/RELEASING b/RELEASING index e3e0cefe..88dab04e 100644 --- a/RELEASING +++ b/RELEASING @@ -62,11 +62,11 @@ repository. From here, there are just a few steps to release: be "1.0.1" and a subsequent bug-fix release would be "1.0.2" etc. - Update bindings/python/notmuch/version.py to match version. + When you are happy with the file 'version', run - Update the version in notmuch.1 to match version. + make update-versions - XXX: Probably these last two steps should be (semi-)automated. + to propagate the version to the other places needed. Commit these changes. diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index d5c95d80..a7f32631 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1135,26 +1135,18 @@ All currently available key bindings: ;; Commands typically bound to keys. -(defun notmuch-show-advance-and-archive () - "Advance through thread and archive. - -This command is intended to be one of the simplest ways to -process a thread of email. It does the following: +(defun notmuch-show-advance () + "Advance through thread. If the current message in the thread is not yet fully visible, scroll by a near screenful to read more of the message. Otherwise, (the end of the current message is already within the -current window), advance to the next open message. - -Finally, if there is no further message to advance to, and this -last message is already read, then archive the entire current -thread, (remove the \"inbox\" tag from each message). Also kill -this buffer, and display the next thread from the search from -which this thread was originally shown." +current window), advance to the next open message." (interactive) (let* ((end-of-this-message (notmuch-show-message-bottom)) - (visible-end-of-this-message (1- end-of-this-message))) + (visible-end-of-this-message (1- end-of-this-message)) + (ret nil)) (while (invisible-p visible-end-of-this-message) (setq visible-end-of-this-message (previous-single-char-property-change visible-end-of-this-message @@ -1173,8 +1165,24 @@ which this thread was originally shown." (notmuch-show-next-open-message)) (t - ;; This is the last message - archive the thread. - (notmuch-show-archive-thread))))) + ;; This is the last message - change the return value + (setq ret t))) + ret)) + +(defun notmuch-show-advance-and-archive () + "Advance through thread and archive. + +This command is intended to be one of the simplest ways to +process a thread of email. It works exactly like +notmuch-show-advance, in that it scrolls through messages in a +show buffer, except that when it gets to the end of the buffer it +archives the entire current thread, (remove the \"inbox\" tag +from each message), kills the buffer, and displays the next +thread from the search from which this thread was originally +shown." + (interactive) + (if (notmuch-show-advance) + (notmuch-show-archive-thread))) (defun notmuch-show-rewind () "Backup through the thread, (reverse scrolling compared to \\[notmuch-show-advance-and-archive]). diff --git a/lib/Makefile.local b/lib/Makefile.local index 57dca702..54c4dea4 100644 --- a/lib/Makefile.local +++ b/lib/Makefile.local @@ -30,7 +30,7 @@ LIBRARY_SUFFIX = so LINKER_NAME = libnotmuch.$(LIBRARY_SUFFIX) SONAME = $(LINKER_NAME).$(LIBNOTMUCH_VERSION_MAJOR) LIBNAME = $(SONAME).$(LIBNOTMUCH_VERSION_MINOR).$(LIBNOTMUCH_VERSION_RELEASE) -LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) +LIBRARY_LINK_FLAG = -shared -Wl,--version-script=notmuch.sym,-soname=$(SONAME) -Wl,--no-undefined ifeq ($(LIBDIR_IN_LDCONFIG),1) ifeq ($(DESTDIR),) LIBRARY_INSTALL_POST_COMMAND=ldconfig diff --git a/test/emacs b/test/emacs index 75a0a744..3bf2e29a 100755 --- a/test/emacs +++ b/test/emacs @@ -369,8 +369,18 @@ test_emacs '(notmuch-show "id:\"bought\"") (rotate-yank-pointer 1)) (reverse-region (point-min) (point-max)) (test-output)' -sed -i -e 's/^.*tmp.emacs\/mail.*$/FILENAME/' OUTPUT -test_expect_equal_file OUTPUT $EXPECTED/emacs-stashing +cat <EXPECTED +Sat, 01 Jan 2000 12:00:00 -0000 +Some One +Some One Else +Notmuch +Stash my stashables +id:"bought" +bought +inbox,stashtest +${gen_msg_filename} +EOF +test_expect_equal_file OUTPUT EXPECTED test_begin_subtest "Stashing in notmuch-search" test_emacs '(notmuch-search "id:\"bought\"") diff --git a/test/emacs.expected-output/emacs-stashing b/test/emacs.expected-output/emacs-stashing deleted file mode 100644 index 49235947..00000000 --- a/test/emacs.expected-output/emacs-stashing +++ /dev/null @@ -1,9 +0,0 @@ -Sat, 01 Jan 2000 12:00:00 -0000 -Some One -Some One Else -Notmuch -Stash my stashables -id:"bought" -bought -inbox,stashtest -FILENAME diff --git a/test/notmuch-test b/test/notmuch-test index adfd589f..6c65ed7a 100755 --- a/test/notmuch-test +++ b/test/notmuch-test @@ -60,10 +60,13 @@ else TEST_TIMEOUT_CMD="" fi +trap 'e=$?; kill $!; exit $e' HUP INT TERM # Run the tests for test in $TESTS; do - $TEST_TIMEOUT_CMD ./$test "$@" + $TEST_TIMEOUT_CMD ./$test "$@" & + wait $! done +trap - HUP INT TERM # Report results ./aggregate-results.sh test-results/* diff --git a/test/raw b/test/raw index b7e265a8..99d3a3bf 100755 --- a/test/raw +++ b/test/raw @@ -1,4 +1,4 @@ -#!/usr//bin/env bash +#!/usr/bin/env bash test_description='notmuch show --format=raw' . ./test-lib.sh diff --git a/test/test-lib.sh b/test/test-lib.sh index cf309f94..93867b03 100755 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -398,6 +398,8 @@ emacs_deliver_message () (insert \"${body}\") $@ (message-send-and-exit))" + # opportunistically quit smtp-dummy in case above fails. + { echo QUIT > /dev/tcp/localhost/25025; } 2>/dev/null wait ${smtp_dummy_pid} notmuch new >/dev/null }