diff options
author | Matthieu Moy <git@matthieu-moy.fr> | 2019-01-07 18:48:38 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-07 11:56:09 -0800 |
commit | 99177b34db1d473e8f90544cf0bf83f47308e9ad (patch) | |
tree | 83863688dd418d37d1129eeb5aac0a6f5842874d /contrib/hooks/multimail/migrate-mailhook-config | |
parent | First batch after 2.20.1 (diff) | |
download | tgif-99177b34db1d473e8f90544cf0bf83f47308e9ad.tar.xz |
git-multimail: update to release 1.5.0
Changes are described in CHANGES.
Contributions-by: Matthieu Moy <git@matthieu-moy.fr>
Contributions-by: William Stewart <william.stewart@booking.com>
Contributions-by: Ville Skyttä <ville.skytta@iki.fi>
Contributions-by: Dirk Olmes <dirk.olmes@codedo.de>
Contributions-by: Björn Kautler <Bjoern@Kautler.net>
Contributions-by: Konstantin Ryabitsev <konstantin@linuxfoundation.org>
Contributions-by: Gareth Pye <garethp@gpsatsys.com.au>
Contributions-by: David Lazar <lazard@csail.mit.edu>
Signed-off-by: Matthieu Moy <git@matthieu-moy.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/hooks/multimail/migrate-mailhook-config')
-rwxr-xr-x | contrib/hooks/multimail/migrate-mailhook-config | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/hooks/multimail/migrate-mailhook-config b/contrib/hooks/multimail/migrate-mailhook-config index 992657bbdc..241ba22fa3 100755 --- a/contrib/hooks/multimail/migrate-mailhook-config +++ b/contrib/hooks/multimail/migrate-mailhook-config @@ -110,11 +110,12 @@ def is_section_empty(section, local): try: read_output( - ['git', 'config'] - + local_option - + ['--get-regexp', '^%s\.' % (section,)] + ['git', 'config'] + + local_option + + ['--get-regexp', '^%s\.' % (section,)] ) - except CommandError, e: + except CommandError: + t, e, traceback = sys.exc_info() if e.retcode == 1: # This means that no settings were found. return True @@ -188,7 +189,9 @@ def migrate_config(strict=False, retain=False, overwrite=False): sys.stderr.write( '...copying "%s.%s" to "%s.%s"\n' % (old.section, name, new.section, name) ) - new.set_recipients(name, old.get_recipients(name)) + old_recipients = old.get_all(name, default=None) + old_recipients = ', '.join(o.strip() for o in old_recipients) + new.set_recipients(name, old_recipients) if strict: sys.stderr.write( |