changeset 37326:9cd88dd3bf64

templater: micro-optimize join() with empty separator
author Yuya Nishihara <yuya@tcha.org>
date Tue, 20 Mar 2018 23:16:28 +0900
parents 41a5d815d2c1
children ebf139cbd4a1
files mercurial/templateutil.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/templateutil.py	Sat Mar 17 21:42:27 2018 +0900
+++ b/mercurial/templateutil.py	Tue Mar 20 23:16:28 2018 +0900
@@ -558,6 +558,6 @@
     for x in itemiter:
         if first:
             first = False
-        else:
+        elif sep:
             yield sep
         yield x