[PATCH 4/5] cli: add global option "--uuid"

2015-08-14 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. There are two exceptional cases in uuid handling. 1) notmuch config and notmuch setup don't currently open the database, so it doesn't make sense to check the

[PATCH 4/5] cli: add global option --uuid

2015-08-14 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. There are two exceptional cases in uuid handling. 1) notmuch config and notmuch setup don't currently open the database, so it doesn't make sense to check the

[PATCH 4/5] cli: add global option "--uuid"

2015-08-10 Thread Tomi Ollila
On Sun, Aug 09 2015, David Bremner wrote: > The function notmuch_exit_if_unmatched_db_uuid is split from > notmuch_process_shared_options because it needs an open notmuch > database. > --- > doc/man1/notmuch.rst | 12 ++-- > notmuch-client.h | 4 >

[PATCH 4/5] cli: add global option "--uuid"

2015-08-10 Thread Daniel Schoepe
On Mon, 10 Aug 2015 13:32 +0200, David Bremner wrote: > So compacting is in fact a bit of a strange case, it preserves the > lastmod counters (because those are just terms on documents), but not > the uuid. This means from notmuch point of view have no programmatic way > to know that we can trust

[PATCH 4/5] cli: add global option "--uuid"

2015-08-10 Thread David Bremner
Daniel Schoepe writes: > Based on quick experiments, it seems that the revisions don't change > when compacting the database; is this something that the patches > guarantee or a coincidence? Now that you mention it, I can see that despite essentially quoting the xapian docs, compacting might

[PATCH 4/5] cli: add global option "--uuid"

2015-08-10 Thread Daniel Schoepe
On Sun, 09 Aug 2015 11:24+0200, David Bremner wrote: > +``--uuid=HEX`` > + Enforce that the database UUID (a unique identifier which > + persists until e.g. the database is compacted) > + is HEX; exit with an error if it is not. This is useful to > + detect rollover in

Re: [PATCH 4/5] cli: add global option --uuid

2015-08-10 Thread Tomi Ollila
On Sun, Aug 09 2015, David Bremner da...@tethera.net wrote: The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. --- doc/man1/notmuch.rst | 12 ++-- notmuch-client.h | 4

Re: [PATCH 4/5] cli: add global option --uuid

2015-08-10 Thread Daniel Schoepe
On Mon, 10 Aug 2015 13:32 +0200, David Bremner wrote: So compacting is in fact a bit of a strange case, it preserves the lastmod counters (because those are just terms on documents), but not the uuid. This means from notmuch point of view have no programmatic way to know that we can trust the

Re: [PATCH 4/5] cli: add global option --uuid

2015-08-10 Thread Daniel Schoepe
On Sun, 09 Aug 2015 11:24+0200, David Bremner wrote: +``--uuid=HEX`` + Enforce that the database UUID (a unique identifier which + persists until e.g. the database is compacted) + is HEX; exit with an error if it is not. This is useful to + detect rollover in

[PATCH 4/5] cli: add global option "--uuid"

2015-08-09 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. --- doc/man1/notmuch.rst | 12 ++-- notmuch-client.h | 4 notmuch-compact.c | 4 notmuch-config.c

[PATCH 4/5] cli: add global option --uuid

2015-08-09 Thread David Bremner
The function notmuch_exit_if_unmatched_db_uuid is split from notmuch_process_shared_options because it needs an open notmuch database. --- doc/man1/notmuch.rst | 12 ++-- notmuch-client.h | 4 notmuch-compact.c | 4 notmuch-config.c