diff -r d9f4c182aeca -r 67ee7587abea hgext/interhg.py --- a/hgext/interhg.py Tue Jun 16 22:24:46 2009 +0200 +++ b/hgext/interhg.py Thu Jun 18 08:18:52 2009 +0200 @@ -7,23 +7,25 @@ # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. -# -# The `interhg' Mercurial extension allows you to change changelog and -# summary text just like InterWiki way. -# -# To enable this extension: -# -# [extensions] -# interhg = -# -# These are some example patterns (link to bug tracking, etc.) -# -# [interhg] -# issues = s!issue(\d+)!issue\1<\/a>! -# bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!\1!i -# boldify = s/(^|\s)#(\d+)\b/ #\2<\/b>/ -# -# Add any number of names and patterns to match + +'''expand expressions into changelog and summaries + +This extension allows the use of a special syntax in summaries, +which will be automatically expanded into links or any other +arbitrary expression, much like InterWiki does. + +To enable this extension, add the following lines to your hgrc: + + [extensions] + interhg = + +A few example patterns (link to bug tracking, etc.): + + [interhg] + issues = s!issue(\d+)!issue\1<\/a>! + bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!\1!i + boldify = s/(^|\s)#(\d+)\b/ #\2<\/b>/ +''' import re from mercurial.hgweb import hgweb_mod