[PATCH 3 of 3 V3] extensions: obsolete and remove interhg extension

Angel Ezquerra angel.ezquerra at gmail.com
Sun Feb 10 06:21:27 CST 2013


# HG changeset patch
# User Angel Ezquerra <angel.ezquerra at gmail.com>
# Date 1360404042 -3600
# Node ID 8c8f60f32455214579282ba2d67e36b704227455
# Parent  f9bee14db21432fa90dd2c10cd6880286946d917
extensions: obsolete and remove interhg extension

With the addition of the websub filter extension this extension is no longer
needed. We maintain a sort of backwards compatibility by reading the [interhg]
section and using it as we would use the [websub] section.

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -11,7 +11,7 @@
 
 _extensions = {}
 _order = []
-_ignore = ['hbisect', 'bookmarks', 'parentrevspec']
+_ignore = ['hbisect', 'bookmarks', 'parentrevspec', 'interhg']
 
 def extensions():
     for name in _order:
diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py
--- a/mercurial/hgweb/hgweb_mod.py
+++ b/mercurial/hgweb/hgweb_mod.py
@@ -264,6 +264,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]
diff --git a/tests/test-interhg.t b/tests/test-websub.t
rename from tests/test-interhg.t
rename to tests/test-websub.t
--- a/tests/test-interhg.t
+++ b/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


More information about the Mercurial-devel mailing list