Mercurial > public > mercurial-scm > hg
comparison mercurial/mail.py @ 8343:6fbbb90261b1
mail: updated comment
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Fri, 08 May 2009 15:14:04 +0200 |
parents | 3e544c074459 |
children | 2de7d96593db |
comparison
equal
deleted
inserted
replaced
8342:b24290c72a1d | 8343:6fbbb90261b1 |
---|---|
117 def _charsets(ui): | 117 def _charsets(ui): |
118 '''Obtains charsets to send mail parts not containing patches.''' | 118 '''Obtains charsets to send mail parts not containing patches.''' |
119 charsets = [cs.lower() for cs in ui.configlist('email', 'charsets')] | 119 charsets = [cs.lower() for cs in ui.configlist('email', 'charsets')] |
120 fallbacks = [encoding.fallbackencoding.lower(), | 120 fallbacks = [encoding.fallbackencoding.lower(), |
121 encoding.encoding.lower(), 'utf-8'] | 121 encoding.encoding.lower(), 'utf-8'] |
122 for cs in fallbacks: # util.unique does not keep order | 122 for cs in fallbacks: # find unique charsets while keeping order |
123 if cs not in charsets: | 123 if cs not in charsets: |
124 charsets.append(cs) | 124 charsets.append(cs) |
125 return [cs for cs in charsets if not cs.endswith('ascii')] | 125 return [cs for cs in charsets if not cs.endswith('ascii')] |
126 | 126 |
127 def _encode(ui, s, charsets): | 127 def _encode(ui, s, charsets): |