mbthomas created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers.
REPOSITORY rHG Mercurial BRANCH default REVISION DETAIL https://phab.mercurial-scm.org/D5084 AFFECTED FILES mercurial/utils/dateutil.py CHANGE DETAILS diff --git a/mercurial/utils/dateutil.py b/mercurial/utils/dateutil.py --- a/mercurial/utils/dateutil.py +++ b/mercurial/utils/dateutil.py @@ -303,17 +303,17 @@ if not date: raise error.Abort(_("dates cannot consist entirely of whitespace")) - elif date[0] == "<": + elif date[0:1] == b"<": if not date[1:]: raise error.Abort(_("invalid day spec, use '<DATE'")) when = upper(date[1:]) return lambda x: x <= when - elif date[0] == ">": + elif date[0:1] == b">": if not date[1:]: raise error.Abort(_("invalid day spec, use '>DATE'")) when = lower(date[1:]) return lambda x: x >= when - elif date[0] == "-": + elif date[0:1] == b"-": try: days = int(date[1:]) except ValueError: @@ -323,8 +323,8 @@ % date[1:]) when = makedate()[0] - days * 3600 * 24 return lambda x: x >= when - elif " to " in date: - a, b = date.split(" to ") + elif b" to " in date: + a, b = date.split(b" to ") start, stop = lower(a), upper(b) return lambda x: x >= start and x <= stop else: To: mbthomas, #hg-reviewers Cc: mercurial-devel _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel