Implement foldersort in a python3 compatible way

By default we sort folders alphabetically (for IMAP) according to their
transposed names. For python3, we need to bend a bit backwards to still
allow the use of a cmp() function for foldersort. While going through, I
discovered that we never sort folders for Maildir.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
This commit is contained in:
Sebastian Spaeth
2012-02-06 17:33:50 +01:00
parent 5c598d7e74
commit 19c014c6cd
3 changed files with 26 additions and 9 deletions

View File

@ -496,13 +496,14 @@ remoteuser = username
# one. For example:
# folderincludes = ['debian.user', 'debian.personal']
# You can specify foldersort to determine how folders are sorted.
# You can specify 'foldersort' to determine how folders are sorted.
# This affects order of synchronization and mbnames. The expression
# should return -1, 0, or 1, as the default Python cmp() does. The
# two arguments, x and y, are strings representing the names of the folders
# to be sorted. The sorting is applied *AFTER* nametrans, if any.
#
# To reverse the sort:
# should return -1, 0, or 1, as the default Python cmp() does. The two
# arguments, x and y, are strings representing the names of the folders
# to be sorted. The sorting is applied *AFTER* nametrans, if any. The
# default is to sort IMAP folders alphabetically
# (case-insensitive). Usually, you should never have to modify this. To
# eg. reverse the sort:
#
# foldersort = lambda x, y: -cmp(x, y)