| 1 |
#require serve |
| 2 |
|
| 3 |
$ hg init test |
| 4 |
$ cd test |
| 5 |
|
| 6 |
$ cat > .hg/hgrc <<EOF |
| 7 |
> [extensions] |
| 8 |
> # this is only necessary to check that the mapping from |
| 9 |
> # interhg to websub works |
| 10 |
> interhg = |
| 11 |
> |
| 12 |
> [websub] |
| 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 |
| 15 |
> |
| 16 |
> [interhg] |
| 17 |
> # check that we maintain some interhg backwards compatibility... |
| 18 |
> # yes, 'x' is a weird delimiter... |
| 19 |
> markbugs = sxbugx<i class="\x">bug</i>x |
| 20 |
> problems = sxPROBLEMx<i class="\x">problem</i>xi |
| 21 |
> EOF |
| 22 |
|
| 23 |
$ touch foo |
| 24 |
$ hg add foo |
| 25 |
$ hg commit -d '1 0' -m 'Issue123: fixed the bug! Ticket456 and problem789 too' |
| 26 |
|
| 27 |
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log |
| 28 |
$ cat hg.pid >> $DAEMON_PIDS |
| 29 |
|
| 30 |
log |
| 31 |
|
| 32 |
$ get-with-headers.py localhost:$HGPORT "rev/tip" | grep bts |
| 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> |
| 34 |
errors |
| 35 |
|
| 36 |
$ cat errors.log |
| 37 |
|
| 38 |
$ cd .. |