Patchwork [5,of,5] py3: fix slicing of bisect label in templatefilters.shortbisect()

login
register
mail settings
Submitter Yuya Nishihara
Date March 10, 2018, 8:11 a.m.
Message ID <af33c19550e40f5b1308.1520669475@mimosa>
Download mbox | patch
Permalink /patch/29245/
State Accepted
Headers show

Comments

Yuya Nishihara - March 10, 2018, 8:11 a.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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()

Patch

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')