summaryrefslogtreecommitdiff
path: root/notmuch-restore.c
Commit message (Collapse)AuthorAge
* lib: Rename iterator functions to prepare for reverse iteration.Carl Worth2010-03-09
| | | | | | | | We rename 'has_more' to 'valid' so that it can function whether iterating in a forward or reverse direction. We also rename 'advance' to 'move_to_next' to setup parallel naming with the proposed functions 'move_to_first', 'move_to_last', and 'move_to_previous'.
* notmuch restore: Don't waste time with messages with unchanged tags.Carl Worth2010-02-05
| | | | | | | | | | It's a simple optimization to look at a message and check that the existing tags are actually different than the tags we are setting before we do anything. For my mail store this takes a "notmuch restore" that does nothing from about 10 minutes down to 1 minute, so there's a significant speedup here.
* Rename NOTMUCH_DATABASE_MODE_WRITABLE to NOTMUCH_DATABASE_MODE_READ_WRITECarl Worth2009-11-21
| | | | And correspondingly, READONLY to READ_ONLY.
* Permit opening the notmuch database in read-only mode.Chris Wilson2009-11-21
| | | | | | | | | We only rarely need to actually open the database for writing, but we always create a Xapian::WritableDatabase. This has the effect of preventing searches and like whilst updating the index. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Carl Worth <cworth@cworth.org>
* notmuch restore was skipping entries with no new tagsKeith Packard2009-11-16
| | | | | | | | | | | notmuch restore used to only add tags; now that it clears existing tags, it needs to operate on messages even if the new tag list is empty. Signed-off-by: Keith Packard <keithp@keithp.com> Reviewed-by: Carl Worth <cworth@cworth.org>: I fixed up the indentation here, (someday we might switch to 8-space indents, but we haven't yet).
* Unbreak several notmuch commands after the addition of configuration.Carl Worth2009-11-11
| | | | | | | | | | | | | | | | | | | | | | All of the following commands: notmuch dump notmuch reply notmuch restore notmuch search notmuch show notmuch tag were calling notmuch_database_open with an argument of NULL. This was a legitimate call until the recent addition of configuration, after which it is expected that all commands will lookup the correct path in the configuration file. So fix all these commands to do that. Also, while touching all of these commands, we fix them to use the talloc context that is passed in rather than creating a local talloc context. We also switch from using goto for return values, to doing direct returns as soon as an error is detected, (which can be leak free thanks to talloc).
* notmuch: Break notmuch.c up into several smaller files.Carl Worth2009-11-10
Now that the client sources are alone here in their own directory, (with all the library sources down inside the lib directory), we can break the client up into multiple files without mixing the files up. The hope is that these smaller files will be easier to manage and maintain.