##// END OF EJS Templates
hgweb: fix websub regex flag syntax on Python 3...
Connor Sheehan -
r43189:6ccf539a default
parent child Browse files
Show More
@@ -791,7 +791,7 b' def getwebsubs(repo):'
791 791 flagin = match.group(3)
792 792 flags = 0
793 793 if flagin:
794 for flag in flagin.upper():
794 for flag in pycompat.sysstr(flagin.upper()):
795 795 flags |= re.__dict__[flag]
796 796
797 797 try:
@@ -11,16 +11,18 b''
11 11 >
12 12 > [websub]
13 13 > issues = s|Issue(\d+)|<a href="http://bts.example.org/issue\1">Issue\1</a>|
14 > tickets = s|ticket(\d+)|<a href="http://ticket.example.org/issue\1">Ticket\1</a>|i
14 15 >
15 16 > [interhg]
16 17 > # check that we maintain some interhg backwards compatibility...
17 18 > # yes, 'x' is a weird delimiter...
18 19 > markbugs = sxbugx<i class="\x">bug</i>x
20 > problems = sxPROBLEMx<i class="\x">problem</i>xi
19 21 > EOF
20 22
21 23 $ touch foo
22 24 $ hg add foo
23 $ hg commit -d '1 0' -m 'Issue123: fixed the bug!'
25 $ hg commit -d '1 0' -m 'Issue123: fixed the bug! Ticket456 and problem789 too'
24 26
25 27 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
26 28 $ cat hg.pid >> $DAEMON_PIDS
@@ -28,7 +30,7 b''
28 30 log
29 31
30 32 $ get-with-headers.py localhost:$HGPORT "rev/tip" | grep bts
31 <div class="description"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</div>
33 <div class="description"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>! <a href="http://ticket.example.org/issue456">Ticket456</a> and <i class="x">problem</i>789 too</div>
32 34 errors
33 35
34 36 $ cat errors.log
General Comments 0
You need to be logged in to leave comments. Login now