Commit graph

2270 commits

Author SHA1 Message Date
Jameson Graef Rollins
ec2b0a98cc 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.
2011-09-05 08:54:56 -03:00
Jameson Graef Rollins
ea3a26f590 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.
2011-09-05 08:54:56 -03:00
David Bremner
b71405c9a4 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.
2011-09-05 08:47:48 -03:00
David Bremner
9db2145272 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.
2011-09-05 07:44:14 -03:00
David Bremner
80212b1329 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.
2011-09-05 07:39:44 -03:00
Tomi Ollila
8e2a14bbbb 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.
2011-08-25 09:08:04 -03:00
Sebastian Spaeth
5dc189c82d 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>
2011-08-24 09:13:34 +02:00
Sebastian Spaeth
2fceb738c7 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>
2011-08-24 09:01:50 +02:00
Sebastian Spaeth
73f104445b Revert "python: Simplify setup.py"
This reverts commit 8826fc2d7b.

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>
2011-08-24 08:54:58 +02:00
Sebastian Spaeth
d143757a54 Merge branch 'master' of ssh://notmuchmail.org/git/notmuch 2011-08-23 09:32:30 +02:00
Sebastian Spaeth
8826fc2d7b 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>
2011-08-23 09:30:49 +02:00
David Bremner
4b55df8534 re-enable notmuch.sym generation using POSIX sed
Unfortunately Robin Green's patch 52e4dedf9a 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.
2011-08-21 16:50:39 -03:00
pazz
f10ec87cc3 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>
2011-08-17 14:44:45 +02:00
patrick
ee4579ad27 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
2011-08-15 15:48:50 +02:00
Sebastian Spaeth
dc6b2b4382 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>
2011-08-09 17:48:27 +02:00
Sebastian Spaeth
94c5edd064 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>
2011-08-09 17:45:44 +02:00
pazz
e75fd0d937 python: pep8 compliance for __init__.py 2011-08-09 17:28:24 +02:00
pazz
61b96f2c24 python: pep8 compliance for thread.py 2011-08-09 17:28:24 +02:00
pazz
be7947f459 python: pep8 compliance for tag.py 2011-08-09 17:28:24 +02:00
pazz
c49bcfd4e2 python: pep8 compliance for globals.py 2011-08-09 17:28:24 +02:00
pazz
8176326f30 python: pep8 compliance for filename.py 2011-08-09 17:28:24 +02:00
pazz
e69e30edd7 python: pep8 compliance for database.py 2011-08-09 17:28:24 +02:00
pazz
61f0184707 python: pep8 compliance for message.py 2011-08-09 17:28:24 +02:00
Sebastian Spaeth
9562c7d1fb 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>
2011-08-09 16:51:03 +02:00
Cedric Cabessa
805d737029 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>
2011-08-09 16:34:02 +02:00
David Bremner
68e8560b09 Merge branch 'release' 2011-08-01 21:58:07 +02:00
David Bremner
bb6d99497b debian: new changelog stanza for 0.7
No actual changes, but we need a new stanza to upload to unstable
anyway.
2011-08-01 21:48:13 +02:00
David Bremner
5190b7c008 update NEWS for 0.7
Essentially point form from git log --oneline.
2011-08-01 21:43:54 +02:00
David Bremner
ef36eb794f version: bump to 0.7
No actual changes since 0.7~rc1
2011-08-01 21:18:03 +02:00
David Bremner
fe9c60dba7 Revert "debian: Generate version from debian/changelog"
This reverts commit 2b76283b52.

Conflicts:

	debian/rules
2011-07-29 18:56:52 +02:00
David Bremner
839b7f20f6 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.
2011-07-29 18:56:52 +02:00
David Bremner
97d090c105 bump upstream version to 0.7~rc1 2011-07-29 17:22:42 +02:00
David Bremner
41e3c4e34f debian: changelog stanza for release candiate 2011-07-29 12:20:45 +02:00
Ali Polatel
20aa9b1b7e ruby: Fix typo in documentation
It's Notmuch::FileNames not Notmuch::Filenames
2011-07-29 09:45:16 +03:00
Ali Polatel
e213439cdc ruby: Remove the split file hack from rdoc.sh 2011-07-29 09:44:44 +03:00
Ali Polatel
6ef8e018f8 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
2011-07-29 09:29:54 +03:00
Ali Polatel
666ef9f5f6 ruby: Document remaining undocumented constants 2011-07-29 09:16:12 +03:00
Ali Polatel
517faab24e ruby: Document constants and exceptions right before definition 2011-07-29 09:09:28 +03:00
Ali Polatel
00dfa0a17d ruby: Add list of classes to main documentation 2011-07-29 08:53:02 +03:00
Thomas Jost
1c71d943cb libnotmuch: only build symbols list after the modules are built
If the notmuch.sym target does not explicitly depend on $(libnotmuch_modules),
gen-version-script.sh may be run before all the .o files are created, for
example when doing a parallel build on a machine with many cores.
2011-07-20 21:42:35 -03:00
David Bremner
a900ddaba6 Merge commit '0.6.1'
Conflicts:
	lib/Makefile.local

The conflicts are from three kinds of commits not merged into release:
    - typo fixes
    - removal of debug output
    - fix for CLEAN rule

That were never merged into the release branch.
2011-07-17 22:20:37 -03:00
David Bremner
2d69aba586 build-system: tag debian-version as part of the release target
This allows, e.g. gitpkg debian/0.x-1 to do the right thing.  It also
helps enforce the convention that Debian upload -1 is identical to the
release tarball.
2011-07-17 11:20:51 -03:00
David Bremner
b5881942d4 debian: use 3.0 (quilt) source format.
This generates a seperate notmuch-0.x.debian.tar.gz containing
./debian.

In the initial release this is redundant, but for Debian only updates
between releases, this allows updating the contents of ./debian, and
using the rest of the release tarball.
2011-07-17 11:11:57 -03:00
David Bremner
0897209f4d build-system: update version check to support non-native packages.
We could be a bit more flexible about this and support optional Debian
versions, but for the moment, we pick a policy and stick to it.
2011-07-17 11:04:08 -03:00
David Bremner
466f3b57aa build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD
This supports both testing and use by non-upload privileged
users. Along with previous commits in the series, this lets one do a
dry run of the release process and created a tarball, signature file,
and release announcement to inspect before uploading.
2011-07-17 10:59:41 -03:00
David Bremner
9b0dfd11c5 build-system: use signed tag to make tar file, if available.
This as the advantage that "make VERSION=n.m dist" will work correctly
even if the wrong branch happens to be checked out.
2011-07-17 10:59:41 -03:00
David Bremner
60173feb06 build-system: tag earlier in the release process.
If tagging fails, we really don't want to upload tarballs.
2011-07-17 10:59:41 -03:00
David Bremner
939c91b7ef build-system: remove use of git-buildpackage, dput. Add pristine-tar.
The previous setup was dependent on the git-buildpackage configuration
to find the resulting tar file, and consequently a bit fragile.

We use pristine-tar instead to save a checksum-identical copy of the
tar file. This will also faciliate "non-native" debian packages, if
desired.

dput again depends on the local configuration, and mainly is a bit too
brave for me to do automatically.
2011-07-17 10:59:41 -03:00
David Bremner
9fb9fb2986 build-system: run make clean before testing.
The reasoning is that we might have some error in the build system
that causes something not to be rebuilt; this would potentially have
the tests run on the wrong version of the code.
2011-07-17 10:59:41 -03:00
David Bremner
2e13698812 build-system: replace use of ssh with wget for checking the website
The idea is to see if the version we are already releasing exists on
the notmuch website. Using wget allows more people to run this target,
and also allows people with ssh access to run it without access to
their keys.
2011-07-17 10:59:41 -03:00