sup:mainline.git
4 years agoUpdate README for gitorious master
Hamish Downer [Sun, 30 Jun 2013 20:51:36 +0000 (21:51 +0100)]
Update README for gitorious

5 years agoUse old 'syck' module for YAML parsing
Gaute Hope [Wed, 9 Nov 2011 19:43:49 +0000 (20:43 +0100)]
Use old 'syck' module for YAML parsing

5 years agoFix attachment off-by-one line selection in edit-message-mode
Gaute Hope [Sun, 25 Sep 2011 13:50:03 +0000 (15:50 +0200)]
Fix attachment off-by-one line selection in edit-message-mode

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoAllows toggling 'killed' status of a thread
Hamish Downer [Mon, 20 Jun 2011 22:58:01 +0000 (23:58 +0100)]
Allows toggling 'killed' status of a thread

UpdateManager didn't seem responsive to 'killed'/'unkilled' so uses 'labeled'.

Patch actually written by Evan Hanson vnhnsn at gmail dot comma

6 years agoAlways try to canonize person using ContactManager
Tero Tilus [Mon, 24 Jan 2011 23:12:30 +0000 (01:12 +0200)]
Always try to canonize person using ContactManager

Signed-off-by: Tero Tilus <tero@tilus.net>
Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoHookify Time#to_nice_s
Tero Tilus [Tue, 21 Dec 2010 22:55:31 +0000 (00:55 +0200)]
Hookify Time#to_nice_s

Signed-off-by: Tero Tilus <tero@tilus.net>
Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoBugfix: Un-escape slashes when initializing a new Person
Michael Stapelberg [Mon, 24 Jan 2011 18:18:57 +0000 (19:18 +0100)]
Bugfix: Un-escape slashes when initializing a new Person

In Person#full_address, we add slashes by using @name.inspect, so we need to
take care of them here.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoresolve merge conflict from archive_sent branch
Hamish Downer [Sun, 19 Jun 2011 23:27:52 +0000 (00:27 +0100)]
resolve merge conflict from archive_sent branch

6 years agoadd option - should sent mail be archived? archive_sent
Hamish Downer [Sun, 19 Jun 2011 23:07:16 +0000 (00:07 +0100)]
add option - should sent mail be archived?

6 years agoEnsure default options are set
Hamish Downer [Sun, 19 Jun 2011 22:59:14 +0000 (23:59 +0100)]
Ensure default options are set

When a new option is added (previous to this commit) then if it is not
in your config.yaml it would default to false, as sup would just load
your config file and not then check default values.

Now the default values (apart from accounts) are set and are merged with
the values from your file (with the file taking precedence of course). So
any new values added will have the intended default.

6 years agoBe more cautious about invalid content-type headers
Gaudenz Steinlin [Thu, 17 Feb 2011 14:36:27 +0000 (15:36 +0100)]
Be more cautious about invalid content-type headers

The original RMail code calls value.strip.split(/\s*;\s*/)[0].downcase
without checking if split returned an element. This monkey patches the
relevant function for sup to catch this error.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoresolved merge conflict
Hamish Downer [Sun, 19 Jun 2011 21:36:41 +0000 (22:36 +0100)]
resolved merge conflict

6 years agoOnly use account selector if more than one email address available
Hamish Downer [Sun, 19 Jun 2011 21:26:11 +0000 (22:26 +0100)]
Only use account selector if more than one email address available

6 years agoMerge branch 'github_patches' into next
Hamish Downer [Thu, 2 Jun 2011 20:00:30 +0000 (21:00 +0100)]
Merge branch 'github_patches' into next

6 years agoRecover if a draft message is deleted from the filesystem. (issue 61)
Peter Harkins [Fri, 5 Feb 2010 17:13:51 +0000 (11:13 -0600)]
Recover if a draft message is deleted from the filesystem. (issue 61)

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoFix typo that prevented setting sources correctly.
Matthias Vallentin [Sun, 26 Dec 2010 17:16:56 +0000 (09:16 -0800)]
Fix typo that prevented setting sources correctly.

This commit fixes a typo in SentManager.source= that prevented setting
@source_uri correctly.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoChange account_selector so it works with alternate email addresses.
Hamish Downer [Mon, 30 May 2011 17:21:07 +0000 (18:21 +0100)]
Change account_selector so it works with alternate email addresses.

6 years agoedit-message-mode: Add an optional account selector
Damien Leone [Sun, 27 Feb 2011 18:05:35 +0000 (19:05 +0100)]
edit-message-mode: Add an optional account selector

Set to true by default, it allows you to change your account in
edit-mode using a horizontal selector. It doesn't change any of the
previous behaviour since the proper account is selected by default, it
also handles customized choice in case the user edited the From field
manually.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoAdded hook to run in async edit mode.
Hamish Downer [Sun, 3 Apr 2011 21:29:04 +0000 (22:29 +0100)]
Added hook to run in async edit mode.

The hook should not block - so it should use fork() or some such.
For now, you still have to exit the async mode manually.

6 years agoMerge branch 'wrap_quoted' into next
Hamish Downer [Sun, 29 May 2011 17:06:09 +0000 (18:06 +0100)]
Merge branch 'wrap_quoted' into next

6 years agoWrap quoted text according to wrap preferences wrap_quoted
Robin Burchell [Thu, 2 Sep 2010 20:49:24 +0000 (13:49 -0700)]
Wrap quoted text according to wrap preferences

    Wrap quoted text according to wrap preferences

    Wrap expanded sections of quoted text at a column boundary, just like
    sup already does for unquoted text. I split the existing wrapper code
    into a utility function.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoMark thread as read after ThreadViewMode has been instancied
Damien Leone [Sat, 12 Jun 2010 09:21:39 +0000 (11:21 +0200)]
Mark thread as read after ThreadViewMode has been instancied

This patch delays the moment when the ":unread" label is removed so when
opening a thread you know exactly what are the new messages thanks to
the 'N' flag.

6 years agoAdd an option to disable automatic threads loading when scrolling down for slow CPUs
Damien Leone [Sun, 27 Feb 2011 16:35:59 +0000 (17:35 +0100)]
Add an option to disable automatic threads loading when scrolling down for slow CPUs

6 years agoStop warning message about @async_mode
Hamish Downer [Wed, 2 Mar 2011 00:05:17 +0000 (00:05 +0000)]
Stop warning message about @async_mode

6 years agoMerge branch 'async_message_edit' into next
Hamish Downer [Sat, 26 Feb 2011 19:18:00 +0000 (19:18 +0000)]
Merge branch 'async_message_edit' into next

6 years agoShorten confirm discard messages
Hamish Downer [Tue, 22 Feb 2011 17:22:14 +0000 (17:22 +0000)]
Shorten confirm discard messages

The messages to confirm discard no longer include the name of the
file being edited. It is still visible on screen, so it is a bit
redundant, and with the file name, the question is too long to fit
on an 80 character terminal.

6 years agoasync edit mode: clean up
Hamish Downer [Tue, 22 Feb 2011 17:14:30 +0000 (17:14 +0000)]
async edit mode: clean up

Some minor clean up to remove bits that were added during development,
remove extraneous whitespace and improve code style slightly.

6 years agoMerge branch 'ctrl_w' into next
Hamish Downer [Tue, 22 Feb 2011 16:57:35 +0000 (16:57 +0000)]
Merge branch 'ctrl_w' into next

6 years agoctrl-w: rename and neaten up private method ctrl_w
Hamish Downer [Tue, 22 Feb 2011 16:57:12 +0000 (16:57 +0000)]
ctrl-w: rename and neaten up private method

6 years agoFix behaviour of Ctrl-W
Hamish Downer [Mon, 21 Feb 2011 01:13:12 +0000 (01:13 +0000)]
Fix behaviour of Ctrl-W

Ctrl-W will now delete trailing spaces, rather than having to press
Ctrl-W twice to delete each label.

6 years agoremoved extraneous end from crypto.rb
Hamish Downer [Sun, 20 Feb 2011 23:31:36 +0000 (23:31 +0000)]
removed extraneous end from crypto.rb

6 years agoresolved conflict after merge of order_labels
Hamish Downer [Sun, 20 Feb 2011 23:25:18 +0000 (23:25 +0000)]
resolved conflict after merge of order_labels

6 years agoWhen editing labels, they are presented in alphabetical order order_labels
Hamish Downer [Sun, 20 Feb 2011 23:22:05 +0000 (23:22 +0000)]
When editing labels, they are presented in alphabetical order

6 years agoOrder labels alphabetically in thread index mode
Hamish Downer [Sun, 20 Feb 2011 22:57:47 +0000 (22:57 +0000)]
Order labels alphabetically in thread index mode

6 years agoasync mode: ask for confirmation if file is being edited
Hamish Downer [Sun, 20 Feb 2011 22:09:44 +0000 (22:09 +0000)]
async mode: ask for confirmation if file is being edited

6 years agoAsync mode: added method to copy file path to clipboard
Hamish Downer [Sun, 20 Feb 2011 21:51:45 +0000 (21:51 +0000)]
Async mode: added method to copy file path to clipboard

6 years agoProper killable? handling for async edit mode
Hamish Downer [Sun, 20 Feb 2011 21:34:01 +0000 (21:34 +0000)]
Proper killable? handling for async edit mode

6 years agocheck for common editor lock files when exiting async mode
Hamish Downer [Sun, 20 Feb 2011 20:59:44 +0000 (20:59 +0000)]
check for common editor lock files when exiting async mode

6 years agoedit mode will get focus when async mode exits
Hamish Downer [Sun, 20 Feb 2011 20:59:05 +0000 (20:59 +0000)]
edit mode will get focus when async mode exits

6 years agoMerge branch 'gpgme' into next
Hamish Downer [Sun, 20 Feb 2011 19:51:55 +0000 (19:51 +0000)]
Merge branch 'gpgme' into next

Resolved Conflicts:
lib/sup/crypto.rb

6 years agochange extra error checking to use unified error message code gpgme
Hamish Downer [Sun, 20 Feb 2011 19:38:39 +0000 (19:38 +0000)]
change extra error checking to use unified error message code

6 years agoCheck for valid signature before signature.to_s
Gaudenz Steinlin [Thu, 17 Feb 2011 14:26:41 +0000 (15:26 +0100)]
Check for valid signature before signature.to_s

In some circumstances with broken signatures signature.to_s returns nil.
Check for a valid signature before relying on this string. This avoids
an uncaught exception.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoCheck for ArgumentError on signature verification
Gaudenz Steinlin [Thu, 17 Feb 2011 14:13:31 +0000 (15:13 +0100)]
Check for ArgumentError on signature verification

Broken signatures can cause a NULL pointer which results in an
ArguementError when calling ctx.verify_result even if the previous call
to ctx.verify does not raise an exception.

The underling cause is probably a bug in GPGME.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agoUnify formatting of GPGME error messages
Gaudenz Steinlin [Thu, 17 Feb 2011 14:09:23 +0000 (15:09 +0100)]
Unify formatting of GPGME error messages

Create a private function to turn a an exception into a "human friendly"
error message and to add a entry to the logfile. Use this function for
all error paths.

Signed-off-by: Hamish Downer <dmishd@gmail.com>
6 years agodebug statements, better message in async mode
Hamish Downer [Wed, 16 Feb 2011 00:15:14 +0000 (00:15 +0000)]
debug statements, better message in async mode

6 years agohidden buffer will not appear in rollable buffers list
Hamish Downer [Wed, 16 Feb 2011 00:14:15 +0000 (00:14 +0000)]
hidden buffer will not appear in rollable buffers list

6 years agoAsync edit mode sort-of works
Hamish Downer [Tue, 15 Feb 2011 23:17:39 +0000 (23:17 +0000)]
Async edit mode sort-of works

You can edit a message in an external editor, and then go back to sup
and have your changes picked up by the edit-mode, but the buffer
management still leaves something to be desired.

6 years agoresolved conflicts
Hamish Downer [Tue, 15 Feb 2011 21:38:12 +0000 (21:38 +0000)]
resolved conflicts

6 years agomore baby steps towards async mode
Hamish Downer [Tue, 15 Feb 2011 21:16:35 +0000 (21:16 +0000)]
more baby steps towards async mode

6 years agostarted work on edit-message-async-mode
Hamish Downer [Fri, 11 Feb 2011 00:24:08 +0000 (00:24 +0000)]
started work on edit-message-async-mode

6 years agoAllow buffers to be hidden
Hamish Downer [Tue, 15 Feb 2011 21:29:12 +0000 (21:29 +0000)]
Allow buffers to be hidden

This allows buffers to be hidden, at which point they will not
appear in the rollable buffers, or in the buffer list mode.

6 years agoalso re-run crypto-selector after editing field
Hamish Downer [Fri, 11 Feb 2011 00:27:22 +0000 (00:27 +0000)]
also re-run crypto-selector after editing field

6 years agostarted work on edit-message-async-mode
Hamish Downer [Fri, 11 Feb 2011 00:24:08 +0000 (00:24 +0000)]
started work on edit-message-async-mode

6 years agofixed type in gpg checking code
Hamish Downer [Thu, 10 Feb 2011 23:19:29 +0000 (23:19 +0000)]
fixed type in gpg checking code

6 years agofixed type in gpg checking code
Hamish Downer [Thu, 10 Feb 2011 23:19:29 +0000 (23:19 +0000)]
fixed type in gpg checking code

6 years agoimproved crypto start up checks
Hamish Downer [Thu, 10 Feb 2011 23:01:42 +0000 (23:01 +0000)]
improved crypto start up checks

6 years agoimproved crypto start up checks
Hamish Downer [Thu, 10 Feb 2011 23:01:42 +0000 (23:01 +0000)]
improved crypto start up checks

6 years agofix silly mistakes
Hamish Downer [Thu, 10 Feb 2011 00:41:14 +0000 (00:41 +0000)]
fix silly mistakes

6 years agoBetter gpg error checking.
Hamish Downer [Thu, 10 Feb 2011 00:47:58 +0000 (00:47 +0000)]
Better gpg error checking.

The crypto initialize code now checks for a number of common reasons
for GPG not working, all related to the gpg-agent side of things. It
will then give a reasonably friendly error message, helping diagnose
why GPG is not working for you.

In particular it will check whether the environment variable is set,
whether the environment variable points to a file, and whether that
file is a socket.

6 years agofix silly mistakes
Hamish Downer [Thu, 10 Feb 2011 00:41:14 +0000 (00:41 +0000)]
fix silly mistakes

6 years agoBetter gpg error checking.
Hamish Downer [Thu, 10 Feb 2011 00:27:01 +0000 (00:27 +0000)]
Better gpg error checking.

The crypto initialize code now checks for a number of common reasons
for GPG not working, all related to the gpg-agent side of things. It
will then give a reasonably friendly error message, helping diagnose
why GPG is not working for you.

In particular it will check whether the environment variable is set,
whether the environment variable points to a file, and whether that
file is a socket.

6 years agoMerge branch 'rerun_crypto_selector' into next
mish [Wed, 9 Feb 2011 21:48:14 +0000 (21:48 +0000)]
Merge branch 'rerun_crypto_selector' into next

6 years agoRe-run the crypto selector hook after message changes.
Hamish Downer [Wed, 9 Feb 2011 18:58:30 +0000 (18:58 +0000)]
Re-run the crypto selector hook after message changes.

The crypto-selector hook will be re-run after the message is edited,
or after the recipients change due to changing the "Reply to"
selector in reply-mode. So when the recipients change, the default
selector will also change.

However, if the user has manually changed the crypto selector then the
hook will not be re-run, so as to avoid over-riding the user's choice.

6 years agoadded @changed_by_user to HorizontalSelector
Hamish Downer [Tue, 8 Feb 2011 23:53:13 +0000 (23:53 +0000)]
added @changed_by_user to HorizontalSelector

6 years agoonly do signature to_s when it will work
Hamish Downer [Fri, 4 Feb 2011 00:06:52 +0000 (00:06 +0000)]
only do signature to_s when it will work

6 years agoonly do signature to_s when it will work
Hamish Downer [Fri, 4 Feb 2011 00:06:52 +0000 (00:06 +0000)]
only do signature to_s when it will work

6 years agomerged fingerprint
Hamish Downer [Thu, 3 Feb 2011 11:55:51 +0000 (11:55 +0000)]
merged fingerprint

6 years agoshow the FULL key fingerprint, not just the first half
Hamish Downer [Wed, 2 Feb 2011 21:06:22 +0000 (21:06 +0000)]
show the FULL key fingerprint, not just the first half

6 years agosignature summary now states "untrusted" if the signing key is not trusted
Hamish Downer [Wed, 2 Feb 2011 21:02:05 +0000 (21:02 +0000)]
signature summary now states "untrusted" if the signing key is not trusted

6 years agoAdd full fingerprint for untrusted keys
Hamish Downer [Sun, 30 Jan 2011 23:43:14 +0000 (23:43 +0000)]
Add full fingerprint for untrusted keys

When the key that signed a message is not trusted, show the full
fingerprint, as the gpg binary does.

6 years agoCatch case where gpg-agent not running or key not available
Hamish Downer [Sun, 30 Jan 2011 23:37:45 +0000 (23:37 +0000)]
Catch case where gpg-agent not running or key not available

GPGME does not raise an Error when the key is not available (say
gpg-agent is not running, or the key is on removable media and has
been removed). In these cases GPGME returns a zero length string.
This patch checks the returned string and raises an error if it has
zero length.

6 years agoAdd full fingerprint for untrusted keys
Hamish Downer [Sun, 30 Jan 2011 23:43:14 +0000 (23:43 +0000)]
Add full fingerprint for untrusted keys

When the key that signed a message is not trusted, show the full
fingerprint, as the gpg binary does.

6 years agoCatch case where gpg-agent not running or key not available
Hamish Downer [Sun, 30 Jan 2011 23:37:45 +0000 (23:37 +0000)]
Catch case where gpg-agent not running or key not available

GPGME does not raise an Error when the key is not available (say
gpg-agent is not running, or the key is on removable media and has
been removed). In these cases GPGME returns a zero length string.
This patch checks the returned string and raises an error if it has
zero length.

6 years agoresolved merge conflict on gpgme signing fix
Hamish Downer [Sun, 30 Jan 2011 22:53:08 +0000 (22:53 +0000)]
resolved merge conflict on gpgme signing fix

6 years agoFixed the bug that stopped emails being signed.
Hamish Downer [Sun, 30 Jan 2011 22:44:05 +0000 (22:44 +0000)]
Fixed the bug that stopped emails being signed.

Schoolboy error - needed merge! rather than merge

6 years agoMerge branch 'label-colors' into next
Michael Stapelberg [Wed, 26 Jan 2011 20:19:12 +0000 (21:19 +0100)]
Merge branch 'label-colors' into next

6 years agoIndex extra colors label-colors 10
Matías Aguirre [Tue, 25 Jan 2011 02:59:56 +0000 (00:59 -0200)]
Index extra colors

6 years agoCustom label coloring
Matías Aguirre [Tue, 25 Jan 2011 02:54:16 +0000 (00:54 -0200)]
Custom label coloring

6 years agoMerge branch 'master' into next
Rich Lane [Mon, 24 Jan 2011 08:57:55 +0000 (00:57 -0800)]
Merge branch 'master' into next

6 years agoupdate changelog etc for 0.12.1 order_labels maildir_speed
Rich Lane [Mon, 24 Jan 2011 05:05:39 +0000 (21:05 -0800)]
update changelog etc for 0.12.1

6 years agoship sup-import-dump
Rich Lane [Mon, 24 Jan 2011 04:57:09 +0000 (20:57 -0800)]
ship sup-import-dump

6 years agoMerge branch 'master' into next
Rich Lane [Thu, 20 Jan 2011 04:05:19 +0000 (20:05 -0800)]
Merge branch 'master' into next

6 years agofix executable bits
Rich Lane [Thu, 20 Jan 2011 04:04:52 +0000 (20:04 -0800)]
fix executable bits

6 years agoadd sup-import-dump: import message state in sup-dump format
Sascha Silbe [Wed, 19 Jan 2011 13:52:15 +0000 (14:52 +0100)]
add sup-import-dump: import message state in sup-dump format

sup-import-dump imports message state as exported by sup-dump into the index.
It is a direct replacement for the sup-sync --restored functionality that got
lost when merging the maildir branch.
Unlike sup-sync it operates on the index only, so it's fast enough for
periodically importing full dumps to keep multiple sup installations
synchronised.
It should also be easy enough to add support for a "diff" style format that
would allow replaying "logs" if sup were enhanced to write those in the
future.

To give some rough numbers:

Dump file contains 78104 lines, index about 600k entries. 410 entries from the
dump file don't match the index and cause index updates. Transaction mode is
used for all runs.
Cold cache, dry run: 138s real time, 53s user+system
Hot cache, dry run: 42s real time, 40s user+system
Hot cache, changes written to disk: 55s real time, 44s user+system
Hot cache, no updates: 43s real time, 41s user+system

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agoMerge branch 'master' into next
William Morgan [Wed, 19 Jan 2011 23:53:13 +0000 (15:53 -0800)]
Merge branch 'master' into next

6 years agofix gpgme check
William Morgan [Wed, 19 Jan 2011 23:47:28 +0000 (15:47 -0800)]
fix gpgme check

It works as is in 1.9, but in 1.8 it was throwing an exception for even
referencing GPGME::Error if gpgme wasn't installed.

6 years agobugfix in backup yaml saving
William Morgan [Wed, 19 Jan 2011 17:13:32 +0000 (09:13 -0800)]
bugfix in backup yaml saving

6 years agoMerge branch 'master' into next
Rich Lane [Wed, 19 Jan 2011 03:28:04 +0000 (19:28 -0800)]
Merge branch 'master' into next

6 years agoprefer gpg2 (GnuPG 2.x) over gpg (GnuPG 1.x)
Sascha Silbe [Tue, 18 Jan 2011 18:20:21 +0000 (19:20 +0100)]
prefer gpg2 (GnuPG 2.x) over gpg (GnuPG 1.x)

Since 1.9.14 GnuPG can automatically start gpg-agent if it's not already
running (using a well-known socket location). When using GnuPG 1.x gpg-agent
needs to already be running at the time sup is started because the socket
location is random and passed via environment variables.

Autostarting gpg-agent is particularly convenient when using sup via ssh
as gpg-agent would need to be started manually (for local X sessions OTOH
it's often started automatically by distro scripts).

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agogen_sign_user_opts: fall back to default account if no account matches sender
Sascha Silbe [Tue, 18 Jan 2011 18:31:21 +0000 (19:31 +0100)]
gen_sign_user_opts: fall back to default account if no account matches sender

Fixes the following exception:

NoMethodError from thread: main
undefined method `gpgkey' for nil:NilClass
./lib/sup/crypto.rb:226:in `gen_sign_user_opts'
./lib/sup/crypto.rb:48:in `sign'
./lib/sup/util.rb:609:in `send'
./lib/sup/util.rb:609:in `method_missing'
./lib/sup/modes/edit-message-mode.rb:411:in `send'
./lib/sup/modes/edit-message-mode.rb:411:in `build_message'
./lib/sup/modes/edit-message-mode.rb:354:in `send_message'
./lib/sup/mode.rb:59:in `send'
./lib/sup/mode.rb:59:in `handle_input'
./lib/sup/buffer.rb:277:in `handle_input'
bin/sup:260

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agoensure sources.yaml gets flushed to disk
Sascha Silbe [Tue, 18 Jan 2011 18:28:43 +0000 (19:28 +0100)]
ensure sources.yaml gets flushed to disk

Before renaming sources.yaml we need to fsync() it, otherwise we could end up
with an empty file in case of a crash [1].

[1] http://thunk.org/tytso/blog/2009/03/12/delayed-allocation-and-the-zero-length-file-problem/

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agosources.yaml: consistent label ordering
Sascha Silbe [Tue, 18 Jan 2011 18:26:54 +0000 (19:26 +0100)]
sources.yaml: consistent label ordering

Sort labels in sources.yaml so the ordering doesn't change betweeen saves.
This is useful when tracking sources.yaml with a VCS (e.g. git).

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agosup-sync: only show message id of deleted messages in verbose mode
Sascha Silbe [Tue, 18 Jan 2011 18:25:28 +0000 (19:25 +0100)]
sup-sync: only show message id of deleted messages in verbose mode

We show message ids for added messages in verbose mode only, so we should do
the same for deleted messages.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agopre-expand source URIs
Sascha Silbe [Tue, 18 Jan 2011 18:26:17 +0000 (19:26 +0100)]
pre-expand source URIs

Expand the URI for each source resp. each CLI argument only once. This brings
down the time taken by sup-sync for parsing source arguments from 45s to
less than 2 seconds for a list of 13 sources on my XO-1.5.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agobuffer: throw "friendly" exception if question is too long
Sascha Silbe [Tue, 18 Jan 2011 18:26:37 +0000 (19:26 +0100)]
buffer: throw "friendly" exception if question is too long

If a question is too long to fit on screen, the buffer manager currently
throws a hard-to-understand exception deep down in the buffer logic.
Explicitly checking for this condition and throwing a descriptive exception
makes life easier for hook authors.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agosup-sync: show progress for message deletion
Sascha Silbe [Tue, 18 Jan 2011 18:24:42 +0000 (19:24 +0100)]
sup-sync: show progress for message deletion

When moving lots of messages across folders, deleting can take a lot of time
so we should display progress information for deletion.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agopoll: fix message update vs. already-imported detection
Sascha Silbe [Tue, 18 Jan 2011 18:24:27 +0000 (19:24 +0100)]
poll: fix message update vs. already-imported detection

poll_from prepends existing locations to the "new" message, so we can't use
just the first location.

While using the last location would work, calculating the difference should be
fast and is more robust in the face of future changes to poll_from.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agodon't leak fds for mbox sources
Sascha Silbe [Tue, 18 Jan 2011 17:59:33 +0000 (18:59 +0100)]
don't leak fds for mbox sources

Only open the mbox when it's actually used and close it again once we're
finished iterating over it.

Adds a method go_idle to Source to inform the source we're unlikely to
use it in the near future so it can do internal clean-up as appropriate.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agofix EOL spaces
Sascha Silbe [Tue, 18 Jan 2011 17:58:00 +0000 (18:58 +0100)]
fix EOL spaces

Trailing spaces can make dealing with patches a pain for some developers.

Signed-off-by: Sascha Silbe <sascha-pgp@silbe.org>
6 years agoMerge branch 'master' into next
Rich Lane [Wed, 19 Jan 2011 03:09:32 +0000 (19:09 -0800)]
Merge branch 'master' into next