[PATCH 3 of 3 V3 [NOW_WITH_DOCS!]] extensions: obsolete and remove interhg extension
Martin Geisler
martin at geisler.net
Sat Feb 9 17:03:30 CST 2013
Angel Ezquerra <angel.ezquerra at gmail.com> writes:
> # HG changeset patch
> # User Angel Ezquerra <angel.ezquerra at gmail.com>
> # Date 1360404042 -3600
> # Node ID 6b18726f164093ab77ac754b088be2e90482b65c
> # Parent 3d1290c7131e8e1df991f1753ab5e76d3e3cd21e
> 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
> @@ -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')
Would it not be better if the interhg extension became a tiny extension
that just did this?
That way the core wont need to care about the old functionality and new
users wont have to care about patterns in an [interhg] extension.
--
Martin Geisler
More information about the Mercurial-devel
mailing list