setup.py and _build.py to refer some other files based on directory
where setup.py is located (os.path.dirname(sys.argv[0]).
Dropped bindings/python-cffi/version.txt and refer ../../version.txt
instead -- _build.py already refers ../../lib so why have version.txt
twice (with identical content).
In the future xapian will apparently support this more conveniently
for the cases other than READ_ONLY => READ_ONLY
---
lib/database.cc | 23
lib/notmuch.h | 6 +++
lib/open.cc | 45
test/T595-reopen.sh | 125
This will allow re-opening in a different mode (read/write
vs. read-only) with current Xapian API.
---
lib/database-private.h | 4
lib/open.cc| 19 ++-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/lib/database-private.h b/lib/database-private.h
This promotes _choose_xapian_path from static to extern linkage in
order to share between open.cc and database.cc.
---
lib/database.cc | 13 -
lib/notmuch-private.h| 4
lib/open.cc | 6 +++---
test/T055-path-config.sh | 7 +++
4 files changed, 18
Choose sibling directory of xapian database, as .notmuch may not
exist.
---
lib/open.cc| 6 --
test/T400-hooks.sh | 9 -
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/lib/open.cc b/lib/open.cc
index 1e2a62cd..4324deae 100644
--- a/lib/open.cc
+++
The new test is in T055-path-config because it uses the helper
function split_config, and because it seems easier to follow the
database path related tests in one place.
---
notmuch-insert.c | 12 +++-
test/T055-path-config.sh | 10 ++
2 files changed, 13 insertions(+), 9
Introduce a new configuration value for the mail root, and use it in
preference to the database.path (which previously implied the mail was
also in this location.
Further changes to the CLI will be needed to work in this split
configuration.
---
doc/man1/notmuch-config.rst | 14 --
The idea is to allow reuse in n_d_create_with_config. This is
primarily code movement, with some changes in error messages to reduce
the number of input parameters.
---
lib/open.cc | 115 +++-
1 file changed, 68 insertions(+), 47 deletions(-)
diff
This is a bit heavyweight for now, but it will make more sense when we
check multiple locations for the xapian database.
---
lib/open.cc| 67 +++---
test/T360-symbol-hiding.sh | 2 +-
2 files changed, 49 insertions(+), 20 deletions(-)
diff --git
The stat is dropped to avoid a race condition between stat and mkdir.
This changes the default location for backups to make things
tidier. Hopefully there is not user scripts relying on this location.
---
notmuch-new.c| 18 ++
test/T055-path-config.sh | 15
This adds new state variable for the mail root, and uses it most
places db_path was used. The notable exception is dumps from backups.
---
notmuch-new.c| 54 ++--
test/T055-path-config.sh | 41 ++
2 files changed, 76
This is slightly more tidy, but more importantly it allows for re-use
of this code in n_d_create_with_config.
---
lib/open.cc | 29 ++---
1 file changed, 18 insertions(+), 11 deletions(-)
diff --git a/lib/open.cc b/lib/open.cc
index d599aeac..7f25bd36 100644
---
Like the hook directory, we primarily need a way to communicate this
directory between various components, but we may as well let the user
configure it.
---
lib/config.cc | 3 +++
lib/notmuch.h | 1 +
lib/open.cc| 47 --
This is series 2 of 3 revamping configuration. It obsoletes [1].
The first 4 patches are really unfinished business from the the first
series already merged to master. They bring merged configuration (no
more "Defined in Database") to notmuch-show (leaving only
notmuch-config and notmuch-setup
Include the (currently unused) mode argument which will specify which
mode to re-open the database in. Functionality and docs to be
finalized in a followup commit.
---
lib/database.cc | 3 ++-
lib/message.cc| 3 ++-
lib/notmuch-private.h | 3 ---
lib/notmuch.h | 7 +++
4
The additional code is trivial, but making sure we get the priority of
various options correct takes a few tests.
---
lib/open.cc| 4 +++
test/T590-libconfig.sh | 67 +-
2 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/lib/open.cc
This will be tested when notmuch-new is converted to support split
configuration.
---
lib/open.cc | 53 ++--
test/T055-path-config.sh | 15 ++--
2 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/lib/open.cc b/lib/open.cc
This changes some error reporting, either intentionally by reporting
the highest level missing directory, or by side effect from looking in
XDG locations when given null database location.
---
lib/open.cc | 18 +++---
test/T055-path-config.sh | 35
This avoids reading the configuration file twice.
---
lib/open.cc | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/lib/open.cc b/lib/open.cc
index d052f95d..ebf70c15 100644
--- a/lib/open.cc
+++ b/lib/open.cc
@@ -429,8 +429,7 @@
Make checks more uniform between creating new databases and opening
existing ones.
---
lib/open.cc | 73 +---
test/T030-config.sh | 2 +-
test/T560-lib-error.sh | 4 +--
test/T750-user-header.sh | 2 +-
4 files changed, 50 insertions(+),
This gives more flexibility in restructuring the database opening
code.
---
lib/open.cc | 46 +-
1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/lib/open.cc b/lib/open.cc
index f08b5de5..c7fb6f81 100644
--- a/lib/open.cc
+++
In order to open the database in main() for this command, we may need
to re-open it in the (possibly less common) case where crypto options
require it.
---
notmuch-show.c | 26 +++---
notmuch.c| 2 +-
test/T035-read-config.sh | 2 --
3 files
This removes duplication between the struct element and the
configuration string_map entry.
---
lib/config.cc | 3 +++
lib/database-private.h | 3 ---
lib/database.cc| 2 +-
lib/open.cc| 13 +++--
4 files changed, 15 insertions(+), 6 deletions(-)
diff
23 matches
Mail list logo