# HG changeset patch
# User Yuya Nishihara <y...@tcha.org>
# Date 1520342201 21600
#      Tue Mar 06 07:16:41 2018 -0600
# Node ID af33c19550e40f5b13088f1737d9781e07bca548
# Parent  50008d6c32bf2eba12b13bd2ed34149b653ef004
py3: fix slicing of bisect label in templatefilters.shortbisect()

diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -18,6 +18,7 @@ test-basic.t
 test-bheads.t
 test-bisect.t
 test-bisect2.t
+test-bisect3.t
 test-blackbox.t
 test-bookmarks-current.t
 test-bookmarks-merge.t
diff --git a/mercurial/templatefilters.py b/mercurial/templatefilters.py
--- a/mercurial/templatefilters.py
+++ b/mercurial/templatefilters.py
@@ -350,7 +350,7 @@ def shortbisect(label):
     is not a valid bisection status.
     """
     if label:
-        return label[0].upper()
+        return label[0:1].upper()
     return ' '
 
 @templatefilter('shortdate')
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to