Mercurial > public > mercurial-scm > hg-stable
diff mercurial/util.py @ 32202:6f173560c7f4
py3: slice over bytes to prevent getting ascii values
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Fri, 05 May 2017 01:26:13 +0530 |
parents | 5f53c267e362 |
children | 52e222eef646 |
line wrap: on
line diff
--- a/mercurial/util.py Sat Apr 08 11:02:37 2017 +0530 +++ b/mercurial/util.py Fri May 05 01:26:13 2017 +0530 @@ -1980,13 +1980,13 @@ # this piece is for rounding the specific end of unknowns b = bias.get(part) if b is None: - if part[0] in "HMS": + if part[0:1] in "HMS": b = "00" else: b = "0" # this piece is for matching the generic end to today's date - n = datestr(now, "%" + part[0]) + n = datestr(now, "%" + part[0:1]) defaults[part] = (b, n)