[PATCH 5 of 5] py3: fix slicing of bisect label in templatefilters.shortbisect()
Yuya Nishihara
yuya at tcha.org
Sat Mar 10 03:11:15 EST 2018
# HG changeset patch
# User Yuya Nishihara <yuya at 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')
More information about the Mercurial-devel
mailing list