Patchwork D7542: mail: don't complain about a multi-word email.method

login
register
mail settings
Submitter phabricator
Date April 12, 2022, 2:47 p.m.
Message ID <ac7ca9f97a1da9bbb3e73bda1fe23b2f@localhost.localdomain>
Download mbox | patch
Permalink /patch/50842/
State New
Headers show

Comments

phabricator - April 12, 2022, 2:47 p.m.
Closed by commit rHG1d6c6ad645e1: mail: don&#039;t complain about a multi-word email.method (authored by jcristau).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7542?vs=33000&id=33015

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7542/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7542

AFFECTED FILES
  mercurial/mail.py

CHANGE DETAILS




To: jcristau, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches, yuja, mercurial-devel

Patch

diff --git a/mercurial/mail.py b/mercurial/mail.py
--- a/mercurial/mail.py
+++ b/mercurial/mail.py
@@ -260,9 +260,11 @@ 
                 )
             )
     else:
-        if not procutil.findexe(method):
+        command = procutil.shellsplit(method)
+        command = command[0] if command else b''
+        if not (command and procutil.findexe(command)):
             raise error.Abort(
-                _(b'%r specified as email transport, but not in PATH') % method
+                _(b'%r specified as email transport, but not in PATH') % command
             )