diff options
author | Simon Glass <sjg@chromium.org> | 2025-04-07 22:51:46 +1200 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2025-05-27 10:07:41 +0100 |
commit | abfd67cccf8e1a4330ab9601813dd6675c84a9c5 (patch) | |
tree | 468867d3e193b8ff5d3254900c2f0dcf65f8341d | |
parent | e10201aa8ccb1fb681cafab4225399f4fdb8497d (diff) |
patman: Pass aliases to Series.MakeCcFile()
Rather than accessing settings directly, pass the aliases in, so that
we can do the same from tests. With further work this will allow the
tests to work without using settings.alias
Signed-off-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | tools/patman/func_test.py | 2 | ||||
-rw-r--r-- | tools/patman/send.py | 3 | ||||
-rw-r--r-- | tools/patman/series.py | 13 |
3 files changed, 13 insertions, 5 deletions
diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py index b96bf7bd917..2a1731aeec9 100644 --- a/tools/patman/func_test.py +++ b/tools/patman/func_test.py @@ -253,7 +253,7 @@ class TestFunctional(unittest.TestCase): series.DoChecks() cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags, add_maintainers, - None, get_maintainer_script) + None, get_maintainer_script, alias) cmd = gitutil.email_patches( series, cover_fname, args, dry_run, not ignore_bad_tags, cc_file, alias, in_reply_to=in_reply_to, thread=None) diff --git a/tools/patman/send.py b/tools/patman/send.py index 9481a95f2f9..16fae3114a4 100644 --- a/tools/patman/send.py +++ b/tools/patman/send.py @@ -87,7 +87,8 @@ def email_patches(col, series, cover_fname, patch_files, process_tags, its_a_go, smtp_server (str): SMTP server to use to send patches (None for default) """ cc_file = series.MakeCcFile(process_tags, cover_fname, not ignore_bad_tags, - add_maintainers, limit, get_maintainer_script) + add_maintainers, limit, get_maintainer_script, + settings.alias) # Email the patches out (giving the user time to check / cancel) cmd = '' diff --git a/tools/patman/series.py b/tools/patman/series.py index 51ae7f04c89..4322882abd5 100644 --- a/tools/patman/series.py +++ b/tools/patman/series.py @@ -242,7 +242,7 @@ class Series(dict): def GetCcForCommit(self, commit, process_tags, warn_on_error, add_maintainers, limit, get_maintainer_script, - all_skips): + all_skips, alias): """Get the email CCs to use with a particular commit Uses subject tags and get_maintainers.pl script to find people to cc @@ -262,6 +262,9 @@ class Series(dict): all_skips (set of str): Updated to include the set of bouncing email addresses that were dropped from the output. This is essentially a return value from this function. + alias (dict): Alias dictionary + key: alias + value: list of aliases or email addresses Returns: list of str: List of email addresses to cc @@ -284,7 +287,7 @@ class Series(dict): return cc def MakeCcFile(self, process_tags, cover_fname, warn_on_error, - add_maintainers, limit, get_maintainer_script): + add_maintainers, limit, get_maintainer_script, alias): """Make a cc file for us to use for per-commit Cc automation Also stores in self._generated_cc to make ShowActions() faster. @@ -300,6 +303,9 @@ class Series(dict): limit (int): Limit the length of the Cc list (None if no limit) get_maintainer_script (str): The file name of the get_maintainer.pl script (or compatible). + alias (dict): Alias dictionary + key: alias + value: list of aliases or email addresses Return: Filename of temp file created """ @@ -314,7 +320,8 @@ class Series(dict): commit.seq = i commit.future = executor.submit( self.GetCcForCommit, commit, process_tags, warn_on_error, - add_maintainers, limit, get_maintainer_script, all_skips) + add_maintainers, limit, get_maintainer_script, all_skips, + alias) # Show progress any commits that are taking forever lastlen = 0 |