diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py --- a/mercurial/hgweb/webutil.py +++ b/mercurial/hgweb/webutil.py @@ -791,7 +791,7 @@ flagin = match.group(3) flags = 0 if flagin: - for flag in flagin.upper(): + for flag in flagin.upper().decode('ascii'): flags |= re.__dict__[flag] try: diff --git a/tests/test-websub.t b/tests/test-websub.t --- a/tests/test-websub.t +++ b/tests/test-websub.t @@ -11,16 +11,18 @@ > > [websub] > issues = s|Issue(\d+)|Issue\1| + > tickets = s|ticket(\d+)|Ticket\1|i > > [interhg] > # check that we maintain some interhg backwards compatibility... > # yes, 'x' is a weird delimiter... > markbugs = sxbugxbugx + > problems = sxPROBLEMxproblemxi > EOF $ touch foo $ hg add foo - $ hg commit -d '1 0' -m 'Issue123: fixed the bug!' + $ hg commit -d '1 0' -m 'Issue123: fixed the bug! Ticket456 and problem789 too' $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log $ cat hg.pid >> $DAEMON_PIDS @@ -28,7 +30,7 @@ log $ get-with-headers.py localhost:$HGPORT "rev/tip" | grep bts -