aboutsummaryrefslogtreecommitdiff
path: root/test/T055-path-config.sh
AgeCommit message (Collapse)Author
2026-02-16lib/config: add config keys for git-remote-notmuch.David Bremner
The precise function will be explained in a future update to notmuch-config(1).
2024-07-26config: allow custom separators in author listsLars Kotthoff
Allow distinguishing between commas separating authors and separating first and last names. Amended by db: reformat NEWS entry and commit message. Tweaked whitespace in lib/thread.cc.
2023-12-06lib: clear error message on success in _choose_database_pathDavid Bremner
Previously we both found a database and returned a message saying that the database could not be found (along with a success code). This change should prevent spurious error output.
2023-12-06test: add known broken test for incorrect error messageDavid Bremner
Duplicate bug reported in id:87wmtvcor5.fsf@alyssa.is The error message is nonsense, because notmuch config list actually includes the database in those two cases.
2023-04-02lib: add config key INDEX_AS_TEXTDavid Bremner
Higher level processing as a list of regular expressions and documentation will follow.
2022-09-03lib/open: create database path in some casesDavid Bremner
There is some duplication of code here, but not all of the locations valid to find a database make sense to create. Furthermore we nead two passes, so the control flow in _choose_database_path would get a bit convoluted.
2022-09-03test/path-config: set database.mail_root but not database.pathDavid Bremner
The failing "create database" test replicates a bug reported by Sean Whitton [1]. The other two failures also look related to the database being (re)created in the wrong place. [1]: id:87y1wqkw13.fsf@athena.silentflame.com.
2022-09-03test: add test for creating database in various configurations.David Bremner
The existing database creation (via add_email_corpus) was always done in the traditional configuration. The use of xapian-metadata is just to portably ensure that there is a database created where we expect there to be.
2022-08-06tests: remove dead code from T055-path-config.shDavid Bremner
This case statement does nothing.
2022-07-05test: known broken test for top level .notmuch in split configsDavid Bremner
In split configurations there is no special significance to a top level directory called .notmuch in the mail root. Users should therefore be able to have mail stored underneath it.
2022-02-16python-cffi: use config_pairs API in ConfigIteratorDavid Bremner
This returns all of the config keys with non-empty values, not just those that happen to be stored in the database.
2022-02-16test: known broken test for list(db.config) in python-cffi bindingsDavid Bremner
As of notmuch 0.34.2 [1], the python-cffi bindings make available the configuration from both a config file and the database when accessing Database.config like a dictionary. It is therefore confusing that the iterator operations only work on the configuration information stored in the database. [1]: d7f95724132bf658fd151630185899737e2ed829
2021-12-29Merge branch 'release'David Bremner
2021-12-29lib/open: do not consider .notmuch alone as an existing database.David Bremner
It makes perfect sense for users to want to pre-create .notmuch, e.g. to install hooks, so we should handle the case of a .notmuch directory without an actual xapian database more gracefully.
2021-12-29test/new: add known broken test for missing xapian directory.David Bremner
`notmuch new' should go ahead and create the xapian database if it is missing, even in the case where the parent .notmuch (or equivalent) directory exists.
2021-12-04Merge branch 'release'David Bremner
2021-12-04python-cffi: switch to notmuch_database_{open,create}_with_configDavid Bremner
Since release 0.32, libnotmuch provides searching for database and configuration paths. This commit changes the python module notmuch2 to use those facilities. This fixes the bug reported in [1], along with a couple of the deprecation warnings in the python bindings. Database.default_path is deprecated, since it no longer faithfully reflects what libnotmuch is doing, and it is also no longer used in the bindings themselves. This commit choose the default of config=CONFIG.EMPTY (equivalent to passing "" to notmuch_database_open_with_config). This makes the change upward compatible API-wise (at least as far as the test suite verifies), but changing the default to CONFIG.SEARCH would probably be more convenient for bindings users. [1]: id:87h7d4wp6b.fsf@tethera.net
2021-12-04test: add known broken tests for python bindings in split configsDavid Bremner
This reproduces the bug(s) reported in id:87h7d4wp6b.fsf@tethera.net
2021-12-03rename built_with.sexpr_query to built_with.sexp_queriesDavid Bremner
It is confusing to use two different names (sexp vs sexpr) when compared with the command line option --query=sexp and (furthermore) singular vs plural when compared with the man page title.
2021-09-04configure: optional library sfsexpDavid Bremner
The configure part is essentially the same as the other checks using pkg-config. Since the optional inclusion of this feature changes what options are available to the user, include it in the "built_with" pseudo-configuration keys.
2021-08-21test/path-config: use test_expect_equal_file_nonemptyDavid Bremner
This is more robust against crashes when the expected output is also generated by notmuch. In the case where the expected output is explicit, it seems like overkill.
2021-08-18Merge tag 'debian/0.32.3-1'David Bremner
notmuch release 0.32.3-1 for unstable (sid) [dgit] [dgit distro=debian no-split --quilt=linear]
2021-08-17lib/open: look in MAILDIR for database, as documented.David Bremner
This fixes the bug id:87bl9lx864.fsf@kisara.moe
2021-08-17test: add known broken tests for finding database via MAILDIRDavid Bremner
This highlights a bug reported by several users, including Mohsin Kaleem [1]. The inconsistent use of test_begin_subtest_known_broken is because some of these tests pass even though the database cannot be located. This problem is left for a future commit. [1]: id:87bl9lx864.fsf@kisara.moe
2021-06-27lib/config: add NOTMUCH_CONFIG_AUTOCOMMITDavid Bremner
This will be used to control how often atomic transactions are committed.
2021-05-15lib/open: restore default database path of $HOME/mailDavid Bremner
Although this default worked for "notmuch config get", it didn't work most other places. Restore the previous functionality, with the wrinkle that XDG locations will shadow $HOME/mail if they exist. This fixes a bug reported by Jack Kamm in id:87eeefdc8b.fsf@gmail.com
2021-04-06CLI/config: remove calls to notmuch_config_open from top levelDavid Bremner
This will allow simplifying the subcommand interface. Change the internal API to notmuch_config_open to not tie it to the implementation of subcommands in notmuch.c. It also fixes a previously broken test, since notmuch_config_open does not understand the notion of the empty string as a config file name.
2021-03-27CLI/config: support set/get with split configurationDavid Bremner
There are two small code changes. The main one is to retrieve the possibly updated config file name found during the database opening call. The second change is to allow empty config file names, as a (currently broken) way of specifying that configuration should only be taken from the database.
2021-03-27CLI+lib: detect missing database in split configurations.David Bremner
Eventually we want to do all opening of databases in the top level (main function). This means that detection of missing databases needs to move out of subcommands. It also requires updating the library to use the new NO_DATABASE status code.
2021-03-20CLI/new: use configuration variable for backup directoryDavid Bremner
The stat is essentially replaced by the mkdir for error detection purposes. This changes the default location for backups to make things tidier, even in non-split configurations. Hopefully there is not too many user scripts relying on the previous location. Because the default location may not exist, replace the use of stat for error detection with a call to mkdir.
2021-03-20lib/compact: enable split configDavid Bremner
This promotes _choose_xapian_path from static to extern linkage in order to share between open.cc and database.cc.
2021-03-20CLI/insert: support split database and mail rootDavid Bremner
The new test is in T055-path-config because it uses the helper function split_config, and because it seems easier to put the database path related tests in one place.
2021-03-20lib/open: support XDG_DATA_HOME as a fallback database location.David Bremner
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.
2021-03-20CLI/new: support split database and mail locationDavid Bremner
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. The latter will be dealt with properly in a future commit.
2021-03-20lib/open: check for split configuration when creating database.David Bremner
The main functionality will be tested when notmuch-new is converted to support split configuration. Here only the somewhat odd case of split mail root which is actually symlinked to the database path is tested.
2021-03-20lib: support splitting mail from database location.David Bremner
Introduce a new configuration value for the mail root, and use it to locate mail messages in preference to the database.path (which previously implied the mail messages were also in this location. Initially only a subset of the CLI is tested in a split configuration. Further changes will be needed for the remainder of the CLI to work in split configurations.