]> git.notmuchmail.org Git - notmuch/log
notmuch
12 years agopython: add status and message attributes to NotmuchError
Justus Winter [Mon, 26 Sep 2011 01:05:30 +0000 (03:05 +0200)]
python: add status and message attributes to NotmuchError

Providing exception objects with meaningful attribute names
is much nicer than using e.args[].

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
12 years agopython: add a .gitignore file and refine the toplevel one
Justus Winter [Mon, 26 Sep 2011 01:05:29 +0000 (03:05 +0200)]
python: add a .gitignore file and refine the toplevel one

The line 'notmuch' in the toplevel .gitignore file is to broad
and matches bindings/python/notmuch making it cumbersome to
git-add files within that directory.

Refine the toplevel file to only match the generated notmuch
executable and add a more specialized .gitignore file to the
python directory.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
12 years agopython: add begin|end_atomic bindings
Sebastian Spaeth [Wed, 28 Sep 2011 15:50:57 +0000 (17:50 +0200)]
python: add begin|end_atomic bindings

* Add UNBALANCED_ATOMIC status code
  Catch up with the notmuch status codes, and add the UNBALANCED_ATOMIC
  one.
* Add the begin_atomic and end_atomic calls to libnotmuch

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: Add database_find_message_by_filename bindings
Sebastian Spaeth [Wed, 28 Sep 2011 16:27:44 +0000 (18:27 +0200)]
python: Add database_find_message_by_filename bindings

Add it :-)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoNEWS: add item for python bindings.
David Bremner [Mon, 26 Sep 2011 23:27:42 +0000 (20:27 -0300)]
NEWS: add item for python bindings.

Just the one unicode related change this release.

12 years agoNEWS: add item for Ruby bindings.
David Bremner [Mon, 26 Sep 2011 23:23:23 +0000 (20:23 -0300)]
NEWS: add item for Ruby bindings.

This is based on a quick scan of git log.

12 years agoNEWS: start release notes for 0.9
David Bremner [Mon, 26 Sep 2011 23:18:55 +0000 (20:18 -0300)]
NEWS: start release notes for 0.9

Thanks to Austin Clements for providing these notes, and the patches
they describe.

12 years agodebian: add brief summary of changes since 0.8 0.9_rc1 debian/0.9_rc1-1
David Bremner [Sun, 25 Sep 2011 14:27:03 +0000 (11:27 -0300)]
debian: add brief summary of changes since 0.8

12 years agodebian: build-depend on gdb
David Bremner [Sun, 25 Sep 2011 14:16:06 +0000 (11:16 -0300)]
debian: build-depend on gdb

This is needed to enable the atomicity tests at build time.

12 years agotest/atomicity: redirect output from "which"
David Bremner [Sun, 25 Sep 2011 12:12:48 +0000 (09:12 -0300)]
test/atomicity: redirect output from "which"

Without redirection, this produced some slightly confusing output in
case gdb was present.

12 years agodebian: close bug 642240
David Bremner [Sun, 25 Sep 2011 02:15:01 +0000 (23:15 -0300)]
debian: close bug 642240

The bug was really closed by the commit that updated the dependency,
of course.

12 years agotest: make atomicity setup conditional on gdb being present.
David Bremner [Sun, 25 Sep 2011 01:45:33 +0000 (22:45 -0300)]
test: make atomicity setup conditional on gdb being present.

The setup is useless if gdb is not present, so it doesn't hurt to skip
it.  The diff here is huge, but the commit is really just moving most
of the script inside the initial if, and adding an else block to print
a warning.

12 years agolib: bump library minor version because of new symbols.
David Bremner [Sat, 24 Sep 2011 19:13:49 +0000 (16:13 -0300)]
lib: bump library minor version because of new symbols.

This bump is because of the new symbols introduced by the atomicity
patches.

12 years agodebian: set versioned dependency on notmuch for notmuch-emacs
David Bremner [Sat, 24 Sep 2011 18:37:27 +0000 (14:37 -0400)]
debian: set versioned dependency on notmuch for notmuch-emacs

As long as we have no version information in the json output, this
seems like the only possible way of ensuring that the emacs client
code understands the output from the command line tool notmuch.

12 years agoversion: bump to 0.9~rc1
David Bremner [Sat, 24 Sep 2011 16:19:32 +0000 (12:19 -0400)]
version: bump to 0.9~rc1

This version number change should not be taken as definitive, rather
refer to the signed tag.

12 years agodebian: changlog stanza for release candidate
David Bremner [Sat, 24 Sep 2011 16:15:47 +0000 (12:15 -0400)]
debian: changlog stanza for release candidate

12 years agodebian: new symbols for atomicity api
David Bremner [Sat, 24 Sep 2011 18:17:44 +0000 (14:17 -0400)]
debian: new symbols for atomicity api

There are three new symbols in libnotmuch. In addition to notmuch_{begin,end)_atomic,
notmuch_database_find_message_by_filename was exposed.

12 years agolib: Improve notmuch_database_{add,remove}_message documentation.
Austin Clements [Sat, 11 Jun 2011 19:34:11 +0000 (15:34 -0400)]
lib: Improve notmuch_database_{add,remove}_message documentation.

State up front that these functions may add a filename to an existing
message or remove only a filename (and not the message), respectively.
Previously, this key information was buried in return value
documentation or in "notes", which made it seem secondary to these
functions' semantics.

12 years agonew: Wrap adding and removing messages in atomic sections.
Austin Clements [Sat, 29 Jan 2011 16:25:56 +0000 (11:25 -0500)]
new: Wrap adding and removing messages in atomic sections.

This addresses atomicity of tag synchronization, the last atomicity
problems in notmuch new.  Each message add or remove is wrapped in its
own atomic section, so interrupting notmuch new doesn't lose progress.

12 years agonew: Synchronize maildir flags eagerly.
Austin Clements [Fri, 28 Jan 2011 01:51:04 +0000 (20:51 -0500)]
new: Synchronize maildir flags eagerly.

Because flag synchronization is stateless, it can be performed at any
time as long as it's guaranteed to be performed after any change to a
message's filename list.  Take advantage of this to synchronize tags
immediately after a filename is added or removed.

This does not yet make adding or removing a message atomic, but it is
a big step toward atomicity because it reduces the window where the
database tags are inconsistent from nearly the entire notmuch-new to
just around when the message is added or removed.

12 years agonew: Cleanup. De-duplicate file name removal code.
Austin Clements [Sun, 6 Feb 2011 09:28:01 +0000 (04:28 -0500)]
new: Cleanup.  De-duplicate file name removal code.

Previously, file name removal was implemented identically in two
places.  Now it's captured in one function.

This is important because file name removal is about to get slightly
more complicated with eager tag synchronization and correct removal
atomicity.

12 years agonew: Cleanup. Put removed/renamed message count in add_files_state_t.
Austin Clements [Sat, 11 Jun 2011 16:54:05 +0000 (12:54 -0400)]
new: Cleanup.  Put removed/renamed message count in add_files_state_t.

Previously, pointers to these variables were passed around
individually.  This was okay when only one function needed them, but
we're about to need them in a few more places.

12 years agolib: Wrap notmuch_database_add_message in an atomic section.
Austin Clements [Sat, 11 Jun 2011 04:42:58 +0000 (00:42 -0400)]
lib: Wrap notmuch_database_add_message in an atomic section.

Adding a message may involve changes to multiple database documents,
and thus needs to be done in a transaction.  This makes add_message
(and, I think, the whole library) atomicity-safe: library callers only
needs to use atomic sections if they needs atomicity across multiple
library calls.

12 years agolib: Add an API to find a message by filename.
Austin Clements [Sat, 11 Jun 2011 04:19:31 +0000 (00:19 -0400)]
lib: Add an API to find a message by filename.

notmuch_database_find_message_by_filename is mostly stolen from
notmuch_database_remove_message, so this patch also vastly simplfies
the latter using the former.

This API is also useful in its own right and will be used in a later
patch for eager maildir flag synchronization.

12 years agoruby: New exception Notmuch::UnbalancedAtomicError
Ali Polatel [Sat, 24 Sep 2011 12:54:45 +0000 (15:54 +0300)]
ruby: New exception Notmuch::UnbalancedAtomicError

This exception wraps NOTMUCH_STATUS_UNBALANCED_ATOMIC which was added
with the commit e59cc0031fbf84f49e32dedb9927f427d2c49309.

12 years agoruby: Wrap notmuch_database_{begin,end}_atomic
Ali Polatel [Sat, 24 Sep 2011 12:43:43 +0000 (15:43 +0300)]
ruby: Wrap notmuch_database_{begin,end}_atomic

Adding ruby wrappers for functions:
- notmuch_database_begin_atomic()
- notmuch_database_end_atomic()
added by 957f1ba3fc1d737887029ff1787fc6bea94de00b

New functions:
Notmuch::Database.begin_atomic()
Notmuch::Database.end_atomic()

12 years agoruby: Rename destroy to destroy!
Ali Polatel [Sat, 24 Sep 2011 12:25:24 +0000 (15:25 +0300)]
ruby: Rename destroy to destroy!

According to the common Ruby function naming convention, potentially
dangerous functions or functions which operate on the object itself are
suffixed with an exclamation mark. Both of these are true for object
destroying functions.

The following modules are affected:
- Notmuch::Directory
- Notmuch::FileNames
- Notmuch::Query
- Notmuch::Threads
- Notmuch::Thread
- Notmuch::Messages
- Notmuch::Message
- Notmuch::Tags

12 years agolib: Remove message document directly after removing the last file name.
Austin Clements [Sat, 11 Jun 2011 04:07:54 +0000 (00:07 -0400)]
lib: Remove message document directly after removing the last file name.

Previously, notmuch_database_remove_message would remove the message
file name, sync the change to the message document, re-find the
message document, and then delete it if there were no more file names.
An interruption after sync'ing would result in a file-name-less,
permanently un-removable zombie message that would produce errors and
odd results in searches.  We could wrap this in an atomic section, but
it's much simpler to eliminate the round-about approach and just
delete the message document instead of sync'ing it if we removed the
last filename.

12 years agolib: Indicate if there are more filenames after removal.
Austin Clements [Sun, 6 Feb 2011 09:17:49 +0000 (04:17 -0500)]
lib: Indicate if there are more filenames after removal.

Make _notmuch_message_remove_filename return
NOTMUCH_STATUS_DUPLICATE_MESSAGE_ID if the message has more filenames
and fix callers to handle this.

12 years agolib: Add support for nested atomic sections.
Austin Clements [Sat, 11 Jun 2011 03:35:06 +0000 (23:35 -0400)]
lib: Add support for nested atomic sections.

notmuch_database_t now keeps a nesting count and we only start a
transaction or commit for the outermost atomic section.

Introduces a new error, NOTMUCH_STATUS_UNBALANCED_ATOMIC.

12 years agolib: Add notmuch_database_{begin,end}_atomic.
Austin Clements [Sat, 29 Jan 2011 16:25:24 +0000 (11:25 -0500)]
lib: Add notmuch_database_{begin,end}_atomic.

These operations translate into non-flushed Xapian transactions,
allowing arbitrary groups of database operations to be performed
atomically.

12 years agonew: Defer updating directory mtimes until the end.
Austin Clements [Tue, 8 Feb 2011 23:24:33 +0000 (18:24 -0500)]
new: Defer updating directory mtimes until the end.

Previously, if notmuch new were interrupted between updating the
directory mtime and handling removals from that directory, a
subsequent notmuch new would not handle those removals until something
else changed in that directory.  This defers recording the updated
mtime until after removals are handled to eliminate this problem.

12 years agopython: Ensure that we pass utf-8 encoded string to libnotmuch
Martin Owens [Fri, 16 Sep 2011 11:19:14 +0000 (13:19 +0200)]
python: Ensure that we pass utf-8 encoded string to libnotmuch

If we use unicode objects, libnotmuch would not cope with null bytes in
the byte array, so we need to make sure they are nicely formatted as
utf-8.

Introduce a helper function _str which does this throughout the code.

Patch slightly modified by Sebastian Spaeth.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agonew: Don't lose messages on SIGINT.
Austin Clements [Wed, 9 Feb 2011 01:56:31 +0000 (20:56 -0500)]
new: Don't lose messages on SIGINT.

Previously, message removals were always performed, even after a
SIGINT.  As a result, when a message was moved from one folder to
another, a SIGINT between processing the directory the message was
removed from and processing the directory it was added to would result
in notmuch removing that message from the database.

12 years agotest: use test_expect_equal_file in atomicity
David Bremner [Tue, 13 Sep 2011 12:31:46 +0000 (09:31 -0300)]
test: use test_expect_equal_file in atomicity

The documentation claims this is more robust, and it seems to work
fine to switch to the _file variant.

12 years agotest: Convert atomicity test to use test_subtest_known_broken
David Bremner [Sat, 10 Sep 2011 22:02:34 +0000 (19:02 -0300)]
test: Convert atomicity test to use test_subtest_known_broken

This is required because test_expect_equal_failure went away.

12 years agotest: Test atomicity of notmuch new.
Austin Clements [Fri, 28 Jan 2011 18:03:24 +0000 (13:03 -0500)]
test: Test atomicity of notmuch new.

This tests notmuch new's ability to recover from arbitrary stopping
failures.  It interrupts notmuch new after every database commit and,
on every resulting database snapshot, re-runs notmuch new to
completion and checks that the final database state is invariant.

12 years agolib: Add missing status check in _notmuch_message_remove_filename.
Austin Clements [Fri, 10 Jun 2011 19:58:18 +0000 (15:58 -0400)]
lib: Add missing status check in _notmuch_message_remove_filename.

Previously, this function would synchronize the folder list even if
removing the file name failed.  Now it returns immediately if removing
the file name fails.

12 years agotest: Report test failures from test_expect_*
Austin Clements [Thu, 12 May 2011 13:11:36 +0000 (09:11 -0400)]
test: Report test failures from test_expect_*

This makes test_expect_* return non-zero if the test fails, so the
caller can make decisions based on this, such as setting test
prerequisites.

12 years agotest: Fix message when skipping test_expect_equal* tests
Austin Clements [Thu, 12 May 2011 13:09:06 +0000 (09:09 -0400)]
test: Fix message when skipping test_expect_equal* tests

For these types of tests, the test name is previously recorded in a
variable, not passed to the test function, so pass this variable to
test_skip.

12 years agotest: reset test_subtest_known_broken_ after each success/failure.
David Bremner [Tue, 13 Sep 2011 01:40:57 +0000 (22:40 -0300)]
test: reset test_subtest_known_broken_ after each success/failure.

This means that test_subtest_known_broken needs to be called before
every known broken subtest, which is no different than what is
documented for the test_begin_subtest case.

The assumption is that every test ends up calling either skipping,
calling test_ok_ or test_failure_ and and the latter in turn delegate
to the known_broken versions in the case where
test_subtest_known_broken_ is set.

12 years agoAdd missing call to g_type_init()
Aaron Ecay [Mon, 25 Jul 2011 23:38:58 +0000 (19:38 -0400)]
Add missing call to g_type_init()

The Glib docs state "Prior to any use of the type system, g_type_init() has to
be called".[1] To not do so can lead to segfaults.  The g_type system is
currently used by various "filters" that operate on uuencoded text, message
headers, etc.

[1] http://developer.gnome.org/gobject/2.28/gobject-Type-Information.html#g-type-init

12 years agotest: mark multipart rfc822 part test as broken
David Bremner [Sat, 10 Sep 2011 18:00:17 +0000 (15:00 -0300)]
test: mark multipart rfc822 part test as broken

Using the new test_subtest_known_broken support thanks to Dmitry
Kurochkin.  This makes the output less scary until we can fix the
underlying problems.

12 years agotest: remove documentation for test_expect_equal_failure.
David Bremner [Sat, 10 Sep 2011 17:54:56 +0000 (14:54 -0300)]
test: remove documentation for test_expect_equal_failure.

The actual function was deleted in commit 4cc67276

12 years agotest: add emacs test for hiding a message following an HTML part
Dmitry Kurochkin [Mon, 4 Jul 2011 04:07:21 +0000 (08:07 +0400)]
test: add emacs test for hiding a message following an HTML part

Human-friendly scenario:

* open a thread where a message which ends with an HTML part is
  followed by another message

* make the first message visible

* goto the beginning of the second message (first line, first colon)

* hit "RET"

Result: nothing happens except for "No URL at point" message

Expected result: the second message is shown/hidden

The root cause is that the HTML part has `keymap' text property set.
In particular, "RET" is bound to visit a URL at point.  The problem is
that `keymap' property affects the next character following the region
it is set to (see elisp manual [1]).  Hence, the first character of
the next message has a keymap inherited from the HTML part.

[1] http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html

12 years agotest: improve known broken tests support
Dmitry Kurochkin [Mon, 4 Jul 2011 04:07:20 +0000 (08:07 +0400)]
test: improve known broken tests support

There is existing support for broken tests.  But it is not convenient
to use.  The primary issue is that we have to maintain a set of
test_expect_*_failure functions which are equivalent to the normal
test_expect_* counterparts except for what functions are called for
result reporting.  The patch adds test_subtest_known_broken function
which marks a subset as broken, making the normal test_expect_*
functions behave as test_expect_*_failure.  All test_expect_*_failure
functions are removed.  Test_known_broken_failure_ is changed to
format details the same way as test_failure_ does.

Another benefit of this change is that the diff when a broken test is
fixed would be small and nice.

Documentation is updated accordingly.

12 years agotest: update documentation for test_emacs in test/README
Dmitry Kurochkin [Mon, 4 Jul 2011 04:07:19 +0000 (08:07 +0400)]
test: update documentation for test_emacs in test/README

Update test_emacs documentation in test/README according to the latest
changes in emacs tests.  Move the note regarding setting variables
from test/emacs to test/README.

12 years agoMerge branch 'release'
David Bremner [Sat, 10 Sep 2011 13:11:25 +0000 (10:11 -0300)]
Merge branch 'release'

12 years agoupdate date in NEWS to better approximate real release date for 0.8 0.8
David Bremner [Sat, 10 Sep 2011 12:00:40 +0000 (09:00 -0300)]
update date in NEWS to better approximate real release date for 0.8

12 years agodebian: update changelog for 0.8
David Bremner [Sat, 10 Sep 2011 11:57:43 +0000 (08:57 -0300)]
debian: update changelog for 0.8

12 years agoupdate versions for release 0.8
David Bremner [Sat, 10 Sep 2011 11:55:33 +0000 (08:55 -0300)]
update versions for release 0.8

See commit 6979b65 for more discussion.

12 years agoNEWS: add blurb for python bindings changes
David Bremner [Sat, 10 Sep 2011 11:52:22 +0000 (08:52 -0300)]
NEWS: add blurb for python bindings changes

12 years agoadd news item for ruby
David Bremner [Fri, 9 Sep 2011 13:56:49 +0000 (10:56 -0300)]
add news item for ruby

12 years agoNEWS: add item for build system fixes
David Bremner [Thu, 8 Sep 2011 10:54:10 +0000 (07:54 -0300)]
NEWS: add item for build system fixes

Sed was POSIXed and use of nm dumbed down, replaced by awk hackery.

12 years agoDo not attempt to output part raw if part is not GMimePart.
Jameson Graef Rollins [Fri, 3 Jun 2011 17:01:06 +0000 (10:01 -0700)]
Do not attempt to output part raw if part is not GMimePart.

This was a minor oversite in checking of part type when outputing
content raw.  This was causing gmime was to throw an exception to
stderr.

Unfortunately the gmime exception was not being caught by notmuch, or
the test suite.  I'm not sure if notmuch should have done anything in
this case, but certainly the test suite should be capable of detecting
that something unexpected was output to stderr.

12 years agoupdate versions for release candidate 0.8_rc1
David Bremner [Wed, 7 Sep 2011 01:34:02 +0000 (22:34 -0300)]
update versions for release candidate

we now have three files to keep in sync. That seems wrong, but I guess
we will live with it for now.

The main problem is that the python code is distributed separately, so
it can't get the version from 'version'.

The choice ~rcX is for convenience with debian versioning.

12 years agoAdd NEWS item output improvements to rfc822 part handling.
Jameson Graef Rollins [Tue, 6 Sep 2011 07:17:30 +0000 (00:17 -0700)]
Add NEWS item output improvements to rfc822 part handling.

12 years agoemacs: Improve support for message/rfc822 parts. 0.8_rc0
Jameson Graef Rollins [Mon, 6 Jun 2011 00:29:29 +0000 (17:29 -0700)]
emacs: Improve support for message/rfc822 parts.

The insert-part-message/rfc822 function is overhauled to properly
processes the new formatting of message/rfc822 parts.  The json output
for message parts now includes "headers" and "body" fields, which are
now parsed and output appropriately.

12 years agoImprove handling of message/rfc822 parts by adding a new header_message_part function...
Jameson Graef Rollins [Mon, 6 Jun 2011 00:29:28 +0000 (17:29 -0700)]
Improve handling of message/rfc822 parts by adding a new header_message_part function to the formating structure.

This new function takes a GMimeMessage as input, and outputs the
formatted headers.  This allows for message/rfc822 parts to be
formatted on output in a similar way to full messages (see previous
patch that overhauls the multipart test for more info).

12 years agotest: overhaul multipart test to test for improved message/rfc822 handling
Jameson Graef Rollins [Mon, 5 Sep 2011 19:01:46 +0000 (12:01 -0700)]
test: overhaul multipart test to test for improved message/rfc822 handling

The main goal of this overhaul is to define how message/rfc822 parts
should be handled.  message/rfc822 parts should be output in a similar
fashion to the outer message, including some subset of the rfc822
headers.  The following decisions about formatting of message/rfc822
parts were made:

The format and content of message/rfc822 parts shall be as similar as
possible to that of full messages.  In particular, for formatted
outputs, the "content" of rfc822 part output should include "headers"
and "body" fields).

The "body" field shall include the body of the message.

The "headers" field shall include the following headers, since these
are the ones available from the GMimeMessage:

  "From"
  "To"
  "Cc"
  "Subject"
  "Date"

However, for the case of --format=raw the raw rfc822 should be output,
including all headers.

A subset of relevant headers shall be output in reply.

The test embedded rfc822 message is also modified to be itself
multipart, so we can more fully test how all sub parts of the message
part are output.

Note added by Committer:

Currently, expect one test (--format=raw --part=3, rfc822 part) to fail.

12 years agoMerge branch 'master' of ssh://notmuchmail.org/git/notmuch
Sebastian Spaeth [Mon, 5 Sep 2011 13:53:45 +0000 (15:53 +0200)]
Merge branch 'master' of ssh://notmuchmail.org/git/notmuch

12 years agopython: Make Database take unicode paths
Sebastian Spaeth [Mon, 5 Sep 2011 13:52:12 +0000 (15:52 +0200)]
python: Make Database take unicode paths

Decode and Encode from/to unicode objects as required to be able to take
unicode path names. Previously we would error out when an unicode object
were handed it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agotest: Fix date in test message in multipart test.
Jameson Graef Rollins [Mon, 6 Jun 2011 00:29:26 +0000 (17:29 -0700)]
test: Fix date in test message in multipart test.

The test message date, "Tue, 05 Jan 2001 15:43:57 -0000", is not
actually a real date.  05 Jan 2001 was in fact a Friday, not a
Tuesday.  Date parsers (such as "date" in coreutils) will return "Fri"
as the day for this string, even if "Tue" is specified.

Also, the time zone "-0000" is actually always returned as "+0000", so
we change that here was well.

This will be relevant for later patches when we begin parsing rfc822
part headers, where gmime returns a parsed date string.

If we do want to test date parsing, we should do that in a separate
test.

12 years agotest: some small fixes to multipart test
Jameson Graef Rollins [Mon, 6 Jun 2011 00:29:25 +0000 (17:29 -0700)]
test: some small fixes to multipart test

There were two "--format=text --part=0" tests.  One of them was
supposed to be a test for "--format=text --part=1".

There were also two errant "test_expect_equal_file OUTPUT EXPECTED"
lines, that are removed here.

12 years agobuild system: Check that python bindings have consistent version when releasing
David Bremner [Mon, 5 Sep 2011 11:45:28 +0000 (08:45 -0300)]
build system: Check that python bindings have consistent version when releasing

Thanks to Sebastian Spaeth breaking out version.py, this can be done
without loading notmuch.py, or using sed. version.py is not (yet)
autogenerated because it seems more important to minimize the
differences between the tagged version and the tarball.

12 years agolib/gen-version-script.h: add getline and getdelim to notmuch.sym if needed
David Bremner [Mon, 5 Sep 2011 03:19:32 +0000 (00:19 -0300)]
lib/gen-version-script.h: add getline and getdelim to notmuch.sym if needed

If the configure script detects missing getline and/or getdelim
symbols, then notmuch will use it's own versions. This patch, based on
id:"87k49v12i5.fsf@pc44es141.cs.uni-magdeburg.de" by Matthias
Guedemann, adds the symbols to notmuch.sym as well so they are
properly exported from the library.

12 years agolib/gen-version-script.sh: replace --defined argument to nm with awk
David Bremner [Mon, 5 Sep 2011 02:50:36 +0000 (23:50 -0300)]
lib/gen-version-script.sh: replace --defined argument to nm with awk

OpenBSD nm apparently doesn't support --defined.

The awk condition is based on the assumption that all defined symbols
have some hex number in the first column.

Thanks to Matthias Guedemann reporting the problem, and an earlier
version of this patch.

12 years agofix checking whether header is member of message-hidden-headers
Tomi Ollila [Mon, 22 Aug 2011 11:59:02 +0000 (14:59 +0300)]
fix checking whether header is member of message-hidden-headers

Emacs lisp function 'member' takes element and list as an
argument. I.e. the second argument is list, not symbol
referencing the list.
On emacs 23.x the member call always returned nil (thus buggy),
on emacs 22.x the call failed, making it unusable.

12 years agopython: Have setup.py read the version number without importing
Sebastian Spaeth [Wed, 24 Aug 2011 07:13:34 +0000 (09:13 +0200)]
python: Have setup.py read the version number without importing

Importing the notmuch module in setup.py is a no-no, and we want
to auto-generate the version number in the release process.

Outsource __VERSION__ to the new version.py which contains nothing else
and which can therefor easily be autogenerated. Have setup.py read in
the file via execfile and test if importing the version number actually
worked.

This should make all happy.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: Updated development status and wording in setup.py
Sebastian Spaeth [Wed, 24 Aug 2011 07:01:36 +0000 (09:01 +0200)]
python: Updated development status and wording in setup.py

We are beyond pre-alpha, and the Requirements wording could take some
tweaking. Done.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoRevert "python: Simplify setup.py"
Sebastian Spaeth [Wed, 24 Aug 2011 06:54:58 +0000 (08:54 +0200)]
Revert "python: Simplify setup.py"

This reverts commit 8826fc2d7b4e59afdd8cea06891a0c43245340c5.

It seems that importing the module in setup.py is controversial at best,
as it will fail for users that don't have all dependencies
installed. This was the case in e.g. the Ubuntu autobuilder, so building
notmuch failed. The plan is to create an autogenerated setup.py that can
be used for version information.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoMerge branch 'master' of ssh://notmuchmail.org/git/notmuch
Sebastian Spaeth [Tue, 23 Aug 2011 07:32:30 +0000 (09:32 +0200)]
Merge branch 'master' of ssh://notmuchmail.org/git/notmuch

12 years agopython: Simplify setup.py
Sebastian Spaeth [Tue, 23 Aug 2011 07:30:49 +0000 (09:30 +0200)]
python: Simplify setup.py

We were using a template setup.py which parsed __init__.py in complex
ways just to find out the version number. Simply import notmuch and use
__VERSION__ directly. Also adapt some wording and setup.py values while
going through.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agore-enable notmuch.sym generation using POSIX sed
David Bremner [Sun, 21 Aug 2011 19:45:00 +0000 (16:45 -0300)]
re-enable notmuch.sym generation using POSIX sed

Unfortunately Robin Green's patch 52e4dedf9aa was lost when I created
gen-version-script.sh. This merges his changes manually into that
script. It turns out tabs seem not needed in version script
files, so I simplified a bit and removed the printf.

Thanks to Alexander Botero-Lowry for help and testing.

12 years agopython: Fix unsafe utf-8 decodings
pazz [Tue, 16 Aug 2011 21:37:47 +0000 (22:37 +0100)]
python: Fix unsafe utf-8 decodings

This prevents unsafe calls to decode for return value None in
get_authors/get_subject which would current throw an Exception. Original
patch modified by Sebastian Spaeth.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agodecode headers from utf-8 to unicode
patrick [Fri, 12 Aug 2011 13:23:28 +0000 (14:23 +0100)]
decode headers from utf-8 to unicode

as mail headers are stored as utf-8 in the index,
it is safe to return them as unicode strings directly

12 years agopython: remove Tags().__len__() implementation
Sebastian Spaeth [Tue, 9 Aug 2011 15:48:27 +0000 (17:48 +0200)]
python: remove Tags().__len__() implementation

len() exhausts the tag iterator and e.g. list() or "".join(tags)
implicitly call len() if existing and then failing. So, we remove
Tags.__len__().

If you need to know the number of tags a message has, do use
len(list(tags)). It would be nicer to be able to support len() directly...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: Do explicitly check if the next tag exists
Sebastian Spaeth [Tue, 9 Aug 2011 15:45:44 +0000 (17:45 +0200)]
python: Do explicitly check if the next tag exists

If we try to pull a non-existing tag, Tags._get will return None and the
appended .decode() command will fail. So make sure that there is a tag to
be fetched before fetching it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: pep8 compliance for __init__.py
pazz [Tue, 12 Jul 2011 20:23:37 +0000 (21:23 +0100)]
python: pep8 compliance for __init__.py

12 years agopython: pep8 compliance for thread.py
pazz [Tue, 12 Jul 2011 20:22:13 +0000 (21:22 +0100)]
python: pep8 compliance for thread.py

12 years agopython: pep8 compliance for tag.py
pazz [Tue, 12 Jul 2011 20:17:03 +0000 (21:17 +0100)]
python: pep8 compliance for tag.py

12 years agopython: pep8 compliance for globals.py
pazz [Tue, 12 Jul 2011 20:16:04 +0000 (21:16 +0100)]
python: pep8 compliance for globals.py

12 years agopython: pep8 compliance for filename.py
pazz [Tue, 12 Jul 2011 20:13:57 +0000 (21:13 +0100)]
python: pep8 compliance for filename.py

12 years agopython: pep8 compliance for database.py
pazz [Tue, 12 Jul 2011 20:11:29 +0000 (21:11 +0100)]
python: pep8 compliance for database.py

12 years agopython: pep8 compliance for message.py
pazz [Tue, 12 Jul 2011 19:46:59 +0000 (20:46 +0100)]
python: pep8 compliance for message.py

12 years agopython: Really throw an error if search_threads() fails
Sebastian Spaeth [Tue, 9 Aug 2011 14:48:43 +0000 (16:48 +0200)]
python: Really throw an error if search_threads() fails

In case, search_threads returns an error we are supposed to throw an
Exception. But we did not "raise" it, this was an oversight and this
commit fixes it.

There is still the problem that there is often output to stderr by
libnotmuch detailing the xapian error and this is simply printed
out. But this requires fixing at the libnotmuch level...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agopython: Fix copy'n paste typo
Cedric Cabessa [Tue, 9 Aug 2011 14:31:12 +0000 (16:31 +0200)]
python: Fix copy'n paste typo

we accessed a wrong attribute due to a copy and paste error. Thanks for
catching this.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
12 years agoMerge branch 'release'
David Bremner [Mon, 1 Aug 2011 19:58:07 +0000 (21:58 +0200)]
Merge branch 'release'

12 years agodebian: new changelog stanza for 0.7 0.7 debian/0.7-1
David Bremner [Mon, 1 Aug 2011 19:48:13 +0000 (21:48 +0200)]
debian: new changelog stanza for 0.7

No actual changes, but we need a new stanza to upload to unstable
anyway.

12 years agoupdate NEWS for 0.7
David Bremner [Mon, 1 Aug 2011 19:43:54 +0000 (21:43 +0200)]
update NEWS for 0.7

Essentially point form from git log --oneline.

12 years agoversion: bump to 0.7
David Bremner [Mon, 1 Aug 2011 19:18:03 +0000 (21:18 +0200)]
version: bump to 0.7

No actual changes since 0.7~rc1

12 years agoRevert "debian: Generate version from debian/changelog" 0.7_rc1 debian/0.7_rc1-1
David Bremner [Fri, 29 Jul 2011 16:48:19 +0000 (18:48 +0200)]
Revert "debian: Generate version from debian/changelog"

This reverts commit 2b76283b52a2389a591ca055b086381c44e2a61f.

Conflicts:

debian/rules

12 years agobuild-system: Add pre-release target
David Bremner [Fri, 29 Jul 2011 15:45:12 +0000 (17:45 +0200)]
build-system: Add pre-release target

This is a lighter weight version of the release target, intended to
support uploading release candidates to Debian.

As a side effect, filter ~ out of VERSION to make tag names.

12 years agobump upstream version to 0.7~rc1
David Bremner [Fri, 29 Jul 2011 15:22:42 +0000 (17:22 +0200)]
bump upstream version to 0.7~rc1

12 years agodebian: changelog stanza for release candiate
David Bremner [Fri, 29 Jul 2011 10:02:40 +0000 (12:02 +0200)]
debian: changelog stanza for release candiate

12 years agoruby: Fix typo in documentation
Ali Polatel [Fri, 29 Jul 2011 06:45:16 +0000 (09:45 +0300)]
ruby: Fix typo in documentation

It's Notmuch::FileNames not Notmuch::Filenames

12 years agoruby: Remove the split file hack from rdoc.sh
Ali Polatel [Fri, 29 Jul 2011 06:43:51 +0000 (09:43 +0300)]
ruby: Remove the split file hack from rdoc.sh

12 years agoruby: Add markers to method definitions to help rdoc
Ali Polatel [Fri, 29 Jul 2011 06:29:54 +0000 (09:29 +0300)]
ruby: Add markers to method definitions to help rdoc

rdoc is dumb and needs markers in method definitions so that she can
find which source file the method is defined in

12 years agoruby: Document remaining undocumented constants
Ali Polatel [Fri, 29 Jul 2011 06:16:12 +0000 (09:16 +0300)]
ruby: Document remaining undocumented constants

12 years agoruby: Document constants and exceptions right before definition
Ali Polatel [Fri, 29 Jul 2011 06:09:28 +0000 (09:09 +0300)]
ruby: Document constants and exceptions right before definition