Comments
Patch
@@ -11,7 +11,7 @@
_extensions = {}
_order = []
-_ignore = ['hbisect', 'bookmarks', 'parentrevspec']
+_ignore = ['hbisect', 'bookmarks', 'parentrevspec', 'interhg']
def extensions():
for name in _order:
@@ -8,6 +8,7 @@
import os
from mercurial import ui, hg, hook, error, encoding, templater, util, repoview
+from mercurial import extensions
from mercurial.templatefilters import websub
from mercurial.i18n import _
from common import get_stat, ErrorResponse, permhooks, caching
@@ -264,6 +265,8 @@
def loadwebsub(self):
websubtable = []
websubdefs = self.repo.ui.configitems('websub')
+ # we must maintain interhg backwards compatibility
+ websubdefs += self.repo.ui.configitems('interhg')
for key, pattern in websubdefs:
# grab the delimiter from the character after the "s"
unesc = pattern[1]
rename from tests/test-interhg.t
rename to tests/test-websub.t
@@ -5,11 +5,15 @@
$ cat > .hg/hgrc <<EOF
> [extensions]
+ > # this is only necessary to check that the mapping from
+ > # interhg to websub works
> interhg =
>
- > [interhg]
+ > [websub]
> issues = s|Issue(\d+)|<a href="http://bts.example.org/issue\1">Issue\1</a>|
>
+ > [interhg]
+ > # check that we maintain some interhg backwards compatibility...
> # yes, 'x' is a weird delimiter...
> markbugs = sxbugx<i class="\x">bug</i>x
> EOF
@@ -23,9 +27,8 @@
log
- $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '' | grep bts
- <td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td>
-
+ $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "rev/tip" | grep bts
+ <div class="description"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</div>
errors
$ cat errors.log