Plan 9 from Bell Labs’s /usr/web/sources/contrib/jas/root/sys/lib/python2.7/site-packages/hgext/interhg.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


��Pc@s�dZddlZddlmZddlmZmZddlmZdZ	gZ
d�Zd�Zej
ejd	e�dS(
s�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.

A few example patterns (link to bug tracking, etc.) that may be used
in your hgrc::

  [interhg]
  issues = s!issue(\d+)!<a href="http://bts/issue\1">issue\1</a>!
  bugzilla = s!((?:bug|b=|(?=#?\d{4,}))(?:\s*#?)(\d+))!<a..=\2">\1</a>!i
  boldify = s!(^|\s)#(\d+)\b! <b>#\2</b>!
i�N(t	hgweb_mod(ttemplatefilterst
extensions(t_tinternalcs-tjd��fd�}|tjd<dS(Ntescapecs9�|�}x&tD]\}}|j||�}qW|S(N(t
interhg_tabletsub(txtescstrtregexptformat(torig_escape(s1/sys/lib/python2.7/site-packages/hgext/interhg.pytinterhg_escape&s(Rtfilters(tuiR
((Rs1/sys/lib/python2.7/site-packages/hgext/interhg.pytuisetup#s
cOs�gt(x||jjjd�D]e\}}|d}tj|�}tjd|||f|�}|s�|jjjtd�||f�qntj	d|�}	|	j
||jd��}
|	j
||jd��}|jd�}d}
|rx(|j�D]}|
tj
|O}
qWny)tj	|
|
�}
tj|
|f�Wqtjk
r�|jjjtd	�||
f�qXqW||||�S(
Ntinterhgis1^s%s(.+)(?:(?<=\\\\)|(?<!\\))%s(.*)%s([ilmsux])*$s$interhg: invalid pattern for %s: %s
s(?<!\\)\\%siiis#interhg: invalid regexp for %s: %s
(RtrepoRtconfigitemstreRtmatchtwarnRtcompileRtgrouptuppert__dict__tappendterror(torigtselftargstkwargstkeytpatterntunesctdelimRtdelim_reR
Rtflagintflagstflag((s1/sys/lib/python2.7/site-packages/hgext/interhg.pytinterhg_refresh.s2"
	trefresh(t__doc__Rtmercurial.hgwebRt	mercurialRRtmercurial.i18nRt
testedwithRRR)twrapfunctionthgweb(((s1/sys/lib/python2.7/site-packages/hgext/interhg.pyt<module>s		%

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].