All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs
@ 2019-10-22  3:09 Dmitry Torokhov
  2019-10-27 16:32 ` Simon Glass
  2019-10-29 23:21 ` sjg at google.com
  0 siblings, 2 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2019-10-22  3:09 UTC (permalink / raw)
  To: u-boot

There is a contributor in Linux kernel with a comma in their name, which
confuses patman and results in invalid to- or cc- addresses on some
patches. To avoid this, let's use \0 as a separator when generating cc
file.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
---

Changes in v2:
- updated test cases so that 'patman --test' passes

 tools/patman/func_test.py | 4 ++--
 tools/patman/patman.py    | 2 +-
 tools/patman/series.py    | 4 ++--
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/patman/func_test.py b/tools/patman/func_test.py
index 50a2741439..2321f9e028 100644
--- a/tools/patman/func_test.py
+++ b/tools/patman/func_test.py
@@ -198,9 +198,9 @@ class TestFunctional(unittest.TestCase):
         line += 4
         self.assertEqual(expected, tools.ToUnicode(lines[line]))
 
-        self.assertEqual(('%s %s, %s' % (args[0], rick, stefan)),
+        self.assertEqual(('%s %s\0%s' % (args[0], rick, stefan)),
                          tools.ToUnicode(cc_lines[0]))
-        self.assertEqual(('%s %s, %s, %s, %s' % (args[1], fred, ed, rick,
+        self.assertEqual(('%s %s\0%s\0%s\0%s' % (args[1], fred, ed, rick,
                                      stefan)), tools.ToUnicode(cc_lines[1]))
 
         expected = '''
diff --git a/tools/patman/patman.py b/tools/patman/patman.py
index 9605a36eff..0187ebe1d4 100755
--- a/tools/patman/patman.py
+++ b/tools/patman/patman.py
@@ -112,7 +112,7 @@ elif options.cc_cmd:
     for line in fd.readlines():
         match = re_line.match(line)
         if match and match.group(1) == args[0]:
-            for cc in match.group(2).split(', '):
+            for cc in match.group(2).split('\0'):
                 cc = cc.strip()
                 if cc:
                     print(cc)
diff --git a/tools/patman/series.py b/tools/patman/series.py
index 67103f03e6..d667d9b6d6 100644
--- a/tools/patman/series.py
+++ b/tools/patman/series.py
@@ -243,13 +243,13 @@ class Series(dict):
             if limit is not None:
                 cc = cc[:limit]
             all_ccs += cc
-            print(commit.patch, ', '.join(sorted(set(cc))), file=fd)
+            print(commit.patch, '\0'.join(sorted(set(cc))), file=fd)
             self._generated_cc[commit.patch] = cc
 
         if cover_fname:
             cover_cc = gitutil.BuildEmailList(self.get('cover_cc', ''))
             cover_cc = [tools.FromUnicode(m) for m in cover_cc]
-            cc_list = ', '.join([tools.ToUnicode(x)
+            cc_list = '\0'.join([tools.ToUnicode(x)
                                  for x in sorted(set(cover_cc + all_ccs))])
             print(cover_fname, cc_list.encode('utf-8'), file=fd)
 
-- 
2.23.0.866.gb869b98d4c-goog

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs
  2019-10-22  3:09 [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs Dmitry Torokhov
@ 2019-10-27 16:32 ` Simon Glass
  2019-10-29 23:21 ` sjg at google.com
  1 sibling, 0 replies; 3+ messages in thread
From: Simon Glass @ 2019-10-27 16:32 UTC (permalink / raw)
  To: u-boot

On Mon, 21 Oct 2019 at 21:10, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> There is a contributor in Linux kernel with a comma in their name, which
> confuses patman and results in invalid to- or cc- addresses on some
> patches. To avoid this, let's use \0 as a separator when generating cc
> file.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>
> Changes in v2:
> - updated test cases so that 'patman --test' passes
>
>  tools/patman/func_test.py | 4 ++--
>  tools/patman/patman.py    | 2 +-
>  tools/patman/series.py    | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs
  2019-10-22  3:09 [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs Dmitry Torokhov
  2019-10-27 16:32 ` Simon Glass
@ 2019-10-29 23:21 ` sjg at google.com
  1 sibling, 0 replies; 3+ messages in thread
From: sjg at google.com @ 2019-10-29 23:21 UTC (permalink / raw)
  To: u-boot

On Mon, 21 Oct 2019 at 21:10, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
>
> There is a contributor in Linux kernel with a comma in their name, which
> confuses patman and results in invalid to- or cc- addresses on some
> patches. To avoid this, let's use \0 as a separator when generating cc
> file.
>
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>
> Changes in v2:
> - updated test cases so that 'patman --test' passes
>
>  tools/patman/func_test.py | 4 ++--
>  tools/patman/patman.py    | 2 +-
>  tools/patman/series.py    | 4 ++--
>  3 files changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-10-29 23:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-22  3:09 [U-Boot] [PATCH v2] patman: separate emails in CC list with NULs Dmitry Torokhov
2019-10-27 16:32 ` Simon Glass
2019-10-29 23:21 ` sjg at google.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.