]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <bremner@debian.org>
Mon, 21 Nov 2011 11:26:11 +0000 (07:26 -0400)
committerDavid Bremner <bremner@debian.org>
Mon, 21 Nov 2011 11:26:11 +0000 (07:26 -0400)
Makefile.local
RELEASING
emacs/notmuch-show.el
lib/Makefile.local
test/emacs
test/emacs.expected-output/emacs-stashing [deleted file]
test/notmuch-test
test/raw
test/test-lib.sh

index 8b42136a640b1c80cef40a8829c8e148e7e6650e..775f39350d200d2ee36743552e44a755ea6fbf44 100644 (file)
@@ -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).
 #
index e3e0cefe69e3dc3f640c1d3471d90f802209d553..88dab04eefd5dcc9ca78f9b76ee71ecf96215d7e 100644 (file)
--- 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.
 
index d5c95d802b701144149c9cc61fa11be0e0791a02..a7f326311a91bb840f5d7c2111503dc0e189fd5d 100644 (file)
@@ -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]).
index 57dca702f116a0bdfdb5e171fb008f6503db7ec7..54c4dea4560b422f39a47cc5304b6de0b1a0484d 100644 (file)
@@ -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
index 75a0a7442f4b46921afa698f1bde9732e8482895..3bf2e29adc018e1b02e21aed3af478dbe0d5f8c9 100755 (executable)
@@ -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 <<EOF >EXPECTED
+Sat, 01 Jan 2000 12:00:00 -0000
+Some One <someone@somewhere.org>
+Some One Else <notsomeone@somewhere.org>
+Notmuch <notmuch@notmuchmail.org>
+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 (file)
index 4923594..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Sat, 01 Jan 2000 12:00:00 -0000
-Some One <someone@somewhere.org>
-Some One Else <notsomeone@somewhere.org>
-Notmuch <notmuch@notmuchmail.org>
-Stash my stashables
-id:"bought"
-bought
-inbox,stashtest
-FILENAME
index adfd589fe0765d19d575d4714f59ef4f352b6022..6c65ed7a282bed731cc5bd4bbf0ce5196ee84dbd 100755 (executable)
@@ -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/*
index b7e265a80da79fd66a69498e95b8cea4168a0071..99d3a3bf0460ee55009c72dcba1814cc59995ff8 100755 (executable)
--- 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
index cf309f9440d4b8a9cc4f4fe941f2b87b36470ef9..93867b03c4e05bb96461ab767d2232a36ebb866f 100755 (executable)
@@ -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
 }