
    6hg                    `   S SK Jr  S SKrS SKrS SKrS SKrSSKJr  SSKJ	r	J
r
  SSKJrJrJrJrJrJr  SSKJrJrJrJrJrJrJrJrJrJrJr  SS	KJr  SS
KJ r   / r!0 r" " S S5      r#\#" S5      S 5       r$\#" S5      S 5       r%S r&\#" S5      S 5       r'S r(\#" S5      S9S j5       r)\#" S5      S 5       r*\#" S5      S 5       r+\#" S5      " \+5      r,S:S jr-\#" S5      S 5       r.\#" S5      S  5       r/\#" S!5      S" 5       r0\#" S#5      S$ 5       r1\#" S%5      S& 5       r2\#" S'5      S( 5       r3\#" S)5      " \35      r4\#" S*5      S+ 5       r5\#" S,5      S- 5       r6\#" S.5      S/ 5       r7\#" S05      S1 5       r8\#" S25      S3 5       r9\#" S45      S5 5       r:S6 r;\#" S75      S8 5       r<\"R{                  5       r>g);    )annotationsN   )_)hexshort   )ErrorResponseHTTP_FORBIDDENHTTP_NOT_FOUNDget_contact	paritygen
staticfile)archivaldagopencodingerrorgraphmodpycompatrevset
revsetlangscmutilsmartsettemplateutil)
stringutil)webutilc                  $    \ rS rSrSrS rS rSrg)
webcommand1   a  Decorator used to register a web command handler.

The decorator takes as its positional arguments the name/path the
command should be accessible under.

When called, functions receive as arguments a ``requestcontext``,
``wsgirequest``, and a templater instance for generatoring output.
The functions should populate the ``rctx.res`` object with details
about the HTTP response.

The function returns a generator to be consumed by the WSGI application.
For most commands, this should be the result from
``web.res.sendresponse()``. Many commands will call ``web.sendtemplate()``
to render a template.

Usage:

@webcommand('mycommand')
def mycommand(web):
    pass
c                    Xl         g Nname)selfr"   s     =/usr/lib/python3/dist-packages/mercurial/hgweb/webcommands.py__init__webcommand.__init__H   s    	    c                    [         R                  [        R                  " U R                  5      5        U[
        U R                  '   U$ r    )__all__appendr   sysstrr"   commands)r#   funcs     r$   __call__webcommand.__call__K   s.    xtyy12"r'   r!   N)__name__
__module____qualname____firstlineno____doc__r%   r.   __static_attributes__ r'   r$   r   r   1   s    ,r'   r   s   logc                    U R                   R                  R                  S5      (       a  [        U 5      $ [	        U 5      $ )a  
/log[/{revision}[/{path}]]
--------------------------

Show repository or file history.

For URLs of the form ``/log/{revision}``, a list of changesets starting at
the specified changeset identifier is shown. If ``{revision}`` is not
defined, the default is ``tip``. This form is equivalent to the
``changelog`` handler.

For URLs of the form ``/log/{revision}/{file}``, the history for a specific
file will be shown. This form is equivalent to the ``filelog`` handler.
   file)reqqsparamsgetfilelog	changelogwebs    r$   logr@   Q   s3    " wwG$$s|~r'   s   rawfilec                X   U R                  SS5      n[        R                  " U R                  U R                  R
                  R                  SS5      5      nU(       d  [        U 5      $  [        R                  " U R                  U R                  5      nUR                  5       nUR                  5       nSnU(       ag  [        R                  " [         R"                  " U5      5      S   nUc!  [$        R&                  " U5      (       a  SnOSnO[         R(                  " U5      nUR+                  S5      (       a  US	[,        R,                  -  -  nX`R.                  R0                  S
'   UR3                  S5      S   R5                  SS5      R5                  SS5      nSU-  U R.                  R0                  S'   U R.                  R7                  U5        U R.                  R9                  5       $ ! [        R                   a&  n [        U 5      s S nA$ ! [         a    Uef = fS nAff = f)N   webs	   guessmimer8   r'   s   application/binaryr   s
   text/plains   text/s   ; charset="%s"   Content-Type   /   \s   \\   "s   \"s   inline; filename="%s"   Content-Disposition)
configboolr   	cleanpathrepor9   r:   r;   manifestfilectxr   LookupErrorr	   pathdata	mimetypes
guess_typer   fsdecoder   binarysysbytes
startswithr   resheaders
rpartitionreplacesetbodybytessendresponse)r?   	guessmimerO   fctxinsttextmtfilenames           r$   rawfilerc   h   s   v|4ISXXsww'7'7';';GS'IJD}sxx1 99;D99;D	B!!("3"3D"9:1=:  &&*"""2&B	}}X
("3"333')GGOOO$b!))%9AA$O  	!8+ GGOO*+ GG77!!=  	C=  	J	s*   ++G/ /H)
HH)H!!H$$H)c                N  ^^ UR                  5       nUR                  5       m[        U R                  5      mUR	                  5       UR                  5       R                  5       ;   n[        R                  " T5      (       aO  [        R                  " [        R                  " [        R                  " U5      5      S   =(       d    S5      nSU-  mUU4S jnU R                  "  SU[        R                   " U5      ["        R$                  " U5      [        R&                  " U R(                  U5      [        R*                  " U5      UR-                  5       R/                  U5      [1        U5      S.[        R2                  " [        R4                  " U R6                  U5      5      D6$ )Nr   application/octet-stream   (binary:%s)c              3     >#    [        TR                  S5      5       H#  u  pUSUS-   -  SUS-   -  [        T5      S.v   M%     g 7f)NT   l%dr      % 6d)   line   lineid
   linenumber   parity)	enumerate
splitlinesnext)contextlinenotparityr`   s      r$   lines_filerevision.<locals>.lines   sL     "4??4#89IF!VaZ0&&1*5<	  :s   AA)filerO   r`   symrevrenamepermissionsishead)s   filerevision)rO   rP   r   stripecountfilenoder<   headsr   rT   r   rU   rQ   rR   rS   sendtemplater   upr   mappinggeneratorsymrevorshortnoder9   
renamelinkrL   flagsint	strkwargscommonentryrK   )r?   r^   fr{   ra   ru   rt   r`   s         @@r$   _filerevisionr      s:   		A99;Ds'F]]_ 4 4 66F  !2!21!56q9 +*
 " 
ZZ]**51(($7!!$'MMO))!,6{
 

W004@
A
 
r'   r8   c                   U R                   R                  R                  S5      S:X  a  [        U 5      $ [        R
                  " U R                  U R                   R                  R                  SS5      5      nU(       d  [        U 5      $  [        U [        R                  " U R                  U R                   5      5      $ ! [        R                   a&  n [        U 5      s SnA$ ! [         a    Uef = fSnAff = f)a  
/file/{revision}[/{path}]
-------------------------

Show information about a directory or file in the repository.

Info about the ``path`` given as a URL parameter will be rendered.

If ``path`` is a directory, information about the entries in that
directory will be rendered. This form is equivalent to the ``manifest``
handler.

If ``path`` is a file, information about that file will be shown via
the ``filerevision`` template.

If ``path`` is not defined, information about the root directory will
be rendered.
   styles   rawr8   r'   N)r9   r:   r;   rc   r   rJ   rK   rL   r   rM   r   rN   r	   )r?   rO   r_   s      r$   rw   rw      s    ( wwH%/s|SXXsww'7'7';';GS'IJD}S'//#((CGG"DEE 	C=  	J	s*   4C C<
C'!C<'C44C77C<c                :  ^ ^^^^^^^ SmSmSmS nU 4S jnU 4S jnTUS4TUS4TUS	40nUUUU 4S
 jnUUUUU 4S jnT R                   R                  S   nT R                  mST R                   R                  ;   aX   [        T R                   R                  R	                  ST5      5      m[        TS5      mTT R                  R                  S   S'   [        R                  " T R                  R                  S   5      n[        TS-  S5      US'   XxS'   [        R                  " T R                  R                  S   5      n	TS-  U	S'   XyS'   U" U5      u  n
mST R                   R                  ;   a  SnXJ   S   nTn
UmOU
T:w  a	  UT   S   nOSnSnXJ   mT R                  S   n[        T R                  5      mT R                  SUUR                  5       S[        R                   " USS9T R#                  S5      U	UTS   UUS9$ ! [         a     GNCf = f)N   revs   keywords   revsetc              3     #    U v   g 7fr    r6   )ctxs    r$   	revsearch_search.<locals>.revsearch   s
     	s   c           	   3  v  >#    [         R                  nU" U 5      R                  5       nU4S jnU" 5        H}  nSnU He  nXa" UR                  5       5      ;   a  M  Xa" UR	                  5       5      ;   a  M9  Xa" SR                  UR                  5       5      5      ;   a  Mc  Sn  O   U(       a  My  Uv   M     g 7f)Nc               3  V  >#    TR                   R                  n [        [        TR                   5      S-
  SS5       He  n/ nU R	                  [        SUS-
  5      U5       H#  nTR                   U   nUR                  U5        M%     UR                  5         U S h  vN   Mg     g  N	7f)Nr   r   ic   )rK   r=   rangelenrevsmaxr*   reverse)cliljr   r?   s        r$   revgen._search.<locals>.keywordsearch.<locals>.revgen   s     ##B3sxx=1,a6QB3A((1+CHHSM 4 		 7 s   BB)B'
B)r       r   )r   lowersplituserdescriptionjoinfiles)queryr   qwr   r   missqr?   s          r$   keywordsearch_search.<locals>.keywordsearch   s     5\!	 8CDsxxz**E#//"344E$))CIIK"899D  I s   AB9B97&B9!B9c              3  B   >#    U  H  nTR                   U   v   M     g 7fr    )rK   )r   rr?   s     r$   revsetsearch_search.<locals>.revsetsearch   s     A((1+ s   s   exact revision searchs   literal keyword searchs   revset expression searchc                r  >  [         R                  " T
R                  U 5      nTU4$ ! [        R                  [        R
                  4 a     Of = fSU -  n [        R                  " U5      nO! [        R                   a    TU 4s $ f = f[        R                  " U5      S::  a  TU 4$ [        S [        R                  " U5       5       5      (       a  TU 4$ [        R                  " U5      nUR                  [        R                  5      (       d  TU 4$  [        R                   " T
R                  R"                  U[        R$                  " T
R                  5      S9nU" T
R                  5      nT	U4$ ! [        R                  [        R&                  [        R(                  [
        4 a    TU 4s $ f = f)Ns   reverse(%s)r   c              3  L   #    U  H  u  pnX=(       d    S SS 4S:H  v   M     g7f)r'   N   )s   strings   re:r6   ).0tokenvalueposs       r$   	<genexpr>1_search.<locals>.getsearchmode.<locals>.<genexpr>  s0      
%@!c \c2A&'+>>%@s   "$)lookup)r   	revsymbolrK   r   	RepoErrorrN   r   parse
ParseErrordepthanytokenize	funcsusedissubsetr   safesymbolsmatchuilookupfnRepoLookupErrorAbort)r   r   revdeftreer   mfuncr   MODE_KEYWORDMODE_REVISIONMODE_REVSETr?   s          r$   getsearchmode_search.<locals>.getsearchmode  s   	&##CHHe4C !#%% !2!23 	 	  %'	'##F+D 	'&&	' D!Q&&& 
%/%8%8%@
 
 
  &&((.	!!&"4"455&&	'LLVFOOCHH,EE ?D$$ !!KK	
 	'  &&	's4   !( $AAA/ /B
	B
AE7 7<F65F6c              3    >#    SnT
S   " T5       H  nUS-  n[         R                  " U5      n[        R                  " TR                  SU5      n[        R
                  " UR                  5       UTR                  5      n[        R                  " TR                  U5      nUR                  [        T5      UUS.5        Uv   UT	:  d  M    g    g 7f)Nr   r      changelogtag)rm   r   s   files)r   binnoder   showtagrK   listfilediffsr   maxfilesr   updaterp   )rq   countr   nshowtagsr   lmfuncargrt   revcount
searchfuncr?   s          r$   
changelist_search.<locals>.changelist9  s     a=)CQJE$Asxx!DH))#))+q#,,GE$$SXXs3BII#F|%-# H # *s   CCC   revcountr      sessionvarsr   s   forcekwr'      tips   searchs   searchentryr!   )
r   noderx   entriesarchivesmorevarslessvarsmodedescshowforcekwshowunforcekw)r9   r:   
maxchangesr   r;   r   tmpldefaults
ValueErrorcopyrK   r   r|   r   r   r   r   archivelist)r?   r   r   r   searchfuncsr   r   r   r   r   moder   r   tipr   r   r   r   rt   r   r   s   `             @@@@@@@r$   _searchr      s9   MLK:
 		#;<}&?@l$?@K/' /'b , GGV$E~~Hcgg&&&	377++//XFGH8Q'H=ECHHn-k: yy**>:;HAq1H[Vyy**>:;H$qLH[V!%(MD'SWW%%%#)!,<%l3A6KK"J
((6
Cs'FWWY--j~N(A#   ;  		s   ?AH 
HH	   changelogc                  ^ ^^ SnST R                   R                  ;   aM  [        R                  " T R                  T R                   5      n[        R
                  " T R                   U5      nO6ST R                   R                  ;   a  [        T 5      $ T R                  S   nSnUUU 4S jnU(       a  T R                  nOT R                  nST R                   R                  ;   aX   [        T R                   R                  R                  SU5      5      n[        US5      nUT R                  R                  S   S'   [        R                  " T R                  R                  S   5      n[        US	-  S5      US'   [        R                  " T R                  R                  S   5      nUS	-  US'   [!        T R                  5      n	UR#                  5       m[%        T R&                  5      m[        R(                  " T R                  5      R+                  TXi5      n
[-        U" US-   5      5      nUS
S n[!        U5      U:  a  USS
 nUS
S nO/ nT R/                  U(       a  SOSU
UR1                  5       TUU	[2        R4                  " U5      [2        R4                  " U5      [2        R4                  " U5      T R7                  S5      UUUUS9$ ! [         a     GNf = f)a  
/changelog[/{revision}]
-----------------------

Show information about multiple changesets.

If the optional ``revision`` URL argument is absent, information about
all changesets starting at ``tip`` will be rendered. If the ``revision``
argument is present, changesets will be shown starting from the specified
revision.

If ``revision`` is absent, the ``rev`` query string argument may be
defined. This will perform a search for changesets.

The argument for ``rev`` can be a single revision, a revision set,
or a literal keyword to search for in changeset data (equivalent to
:hg:`log -k`).

The ``revcount`` query string argument defines the maximum numbers of
changesets to render.

For non-searches, the ``changelog`` template will be rendered.
r'      noder   r   c              3     >#    / nTS:w  a&  TR                   R                  R                  TS5      n[        R                  " TXT5       S h  vN   g  N7f)NrE   r   )rK   r=   r   r   changelistentries)maxcountr   rt   r   r?   s     r$   r   changelog.<locals>.changelist  sF     "988%%**32D,,S$&IIIs   A
AAAr   r   r   r   NrE      shortlogr   )	changenavr   revrx   
changesetsr   latestentry	nextentryr   r   r   r   r   )r9   r:   r   	changectxrK   r   r   maxshortchangesr   r   r;   r   r   r   r   r   r   r   r   r|   revnavgenlistr   r   r   mappinglistr   )r?   shortlogr   r   rx   r   r   r   r   r   r   r   r  r  rt   r   s   `             @@r$   r=   r=     sj   4 E#''"""#''2**377C8	377##	#s|hhvJ &&>>cgg&&&	377++//XFGH8Q'H=ECHHn-k: yy**>:;HAq1H[yy**>:;H$qLH[ME
'')Cs'Fsxx(,,S(BI:hl+,G"1+K
7|hBCL	#2,	\WWY((1 ,,[9**95(   -  		s   &AK 
KKr   c                    [        U SS9$ )z
/shortlog
---------

Show basic information about a set of changesets.

This accepts the same parameters as the ``changelog`` handler. The only
difference is the ``shortlog`` template will be rendered instead of the
``changelog`` template.
T)r
  )r=   r>   s    r$   r
  r
    s     S4((r'   	   changesetc                    [         R                  " U R                  U R                  5      nU R                  " S0 [         R
                  " X5      D6$ )a  
/changeset[/{revision}]
-----------------------

Show information about a single changeset.

A URL path argument is the changeset identifier to show. See ``hg help
revisions`` for possible values. If not defined, the ``tip`` changeset
will be shown.

The ``changeset`` template is rendered. Contents of the ``changesettag``,
``changesetbookmark``, ``filenodelink``, ``filenolink``, and the many
templates related to diffs may all be used to produce the output.
)r  )r   r  rK   r9   r   changesetentry)r?   r   s     r$   	changesetr    s=      

CHHcgg
.CMG,B,B3,LMMr'   r   c                    U $ )zHook for mapping a path in the repository to a path in the
working copy.

Extensions (e.g., largefiles) can override this to remap files in
the virtual file system presented by the manifest command below.r6   )rO   s    r$   
decodepathr    s	     Kr'      manifestc                (  ^^^^^^ SU R                   R                  ;   aM  [        R                  " U R                  U R                   5      m[        R
                  " U R                   T5      nOU R                  S   mSn[        R                  " U R                  U R                   R                  R                  SS5      5      nTR                  5       m[        R                  " T5      n0 m0 m[        U R                  5      mU(       a  USS S:w  a  US-  n[        U5      nSU-   mTR                  5        Hw  u  pV[        U5      nUSU U:w  a  M  XtS nUR!                  S5      n	[        U	5      S:X  a  UTU'   MF  Tn
U	S	S  H!  nX;  a  0 X'   X   n
[        U
5      S:  d  M!    O   SU
S'   My     T(       a  T(       d  T(       d  [#        [$        S
5      eUUUU4S jnUUU4S jnU R&                  "  SUT[        R(                  " T5      [+        T5      [,        R.                  " U5      [,        R.                  " U5      U R1                  [3        U5      5      S.[4        R6                  " [        R8                  " U R                  T5      5      D6$ )a  
/manifest[/{revision}[/{path}]]
-------------------------------

Show information about a directory.

If the URL path arguments are omitted, information about the root
directory for the ``tip`` changeset will be shown.

Because this handler can only show information for directories, it
is recommended to use the ``file`` handler instead, as it can handle both
directories and files.

The ``manifest`` template will be rendered for this handler.
r   r   r8   r'   rE   NrD   r   r   s   path not foundc           	   3     >#    [        T5       HX  nTU   nTR                  U5      nU[        T5      UUR                  5       UR	                  5       TR                  U5      S.v   MZ     g 7f)N)r8   rm      basename   dates   sizes   permissions)sortedrM   rp   datesizer   )rq   r   fullr^   r   r   mfrt   s       r$   filelistmanifest.<locals>.filelistM  s_     A8D;;t$D< " 	 s   A)A,c              3    >#    [        T5       H  n/ nTU   n[        U[        5      (       as  [        U5      S:X  ad  [	        [        UR                  5       5      5      u  pEU(       a  UR                  U5        Un[        U[        5      (       a  [        U5      S:X  a  Md  STU4-  n[	        T	5      USR                  U5      US.v   M     g 7f)Nr   s   %s%srD   )rm      paths	   emptydirsr  )	r  
isinstancedictr   rp   iteritemsr*   r   )
rq   d	emptydirshkvrO   abspathdirsrt   s
          r$   dirlistmanifest.<locals>.dirlist[  s     AIQAQ%%#a&A+DO,$$Q'	 Q%%#a&A+ gq\)D<"ii	2  s   BC!-C)rx   rO   r   upparityfentriesdentriesr   )r  )r9   r:   r   r  rK   r   rJ   r;   rL   r   r   r   r|   r   r#  r  r   r	   r   r   r   rp   r   r   r   r   r   r   r   )r?   rx   rO   r   r   r  r   r   remainelementsr&  elemr  r+  r)  r   r*  r   r  rt   s                 @@@@@@r$   rL   rL     s.   " #''"""#''2**377C8hhvSXXsww'7'7';';GS'IJD	B??3DEDs'FRS	T!D	ATkG88: tRa5D=2<<%x=A E&MA 2= AGGq6A: ' AdG' * 
% N,=>> ( 
::gf..x8..w7T+
 

W003?
@
 
r'      tagsc                  ^ ^^ [        [        T R                  R                  5       5      5      m[	        T R
                  5      mUUU 4S jnT R                  S[        T R                  R                  R                  5       5      [        R                  " USS9[        R                  " USS9[        R                  " USS9S9$ )zk
/tags
-----

Show information about tags.

No arguments are accepted.

The ``tags`` template is rendered.
c              3    >#    TnU(       a  T VVs/ s H  u  pEUS:w  d  M  XE4PM     nnnU(       a  US S nU H;  u  pE[        T5      UTR                  U   R                  5       [        U5      S.v   M=     g s  snnf 7f)Nr   r   )rm      tagr  r   rp   rK   r  r   )	rq   notip
latestonlyrs   r'  r   r   rt   r?   s	         r$   r   tags.<locals>.entries  s|     $%5ADAf!AA5"1ADA<!))+Q	   6s   B A:A:AB r3  )FFargs)TF)TT)r   r   entriesnotipr  )r  reversedrK   tagslistr   r|   r   r   r=   r   r   r   )r?   r   r   rt   s   ` @@r$   tagsr@  |  s     	Xchh'')*+As'F ##'')*--gNK!227O 11'M   r'   	   bookmarksc                T  ^ ^^ T R                   R                  R                  5        Vs/ s H  oS   T R                   ;   d  M  UPM     snmU 4S jn[        TUSS9m[	        T R
                  5      mUUU 4S jnT(       a	  TS   S   nOSnT R                   U   R                  5       nT R                  S[        T R                   R                  R                  5       5      [        R                  " S	U0/5      [        R                  " US
S9[        R                  " USS9S9$ s  snf )z
/bookmarks
----------

Show information about bookmarks.

No arguments are accepted.

The ``bookmarks`` template is rendered.
r   c                N   > TR                   U S      R                  5       U S   4$ Nr   r   rK   r   br?   s    r$   <lambda>bookmarks.<locals>.<lambda>  s#    !A$++-qt4r'   Tkeyr   c              3     >#    TnU(       a  TS S nU H;  u  p4[        T5      UTR                  U   R                  5       [        U5      S.v   M=     g 7f)Nr   rm   s   bookmarkr  r   r7  )rq   r9  rs   r'  r   r   rt   r?   s        r$   r   bookmarks.<locals>.entries  sT     "1ADA<!))+Q	  s   AAr   rE   rA  r  Fr;  )T)r   
lastchanger   r  )rK   
_bookmarksr#  r  r   r|   r  r   r   r=   r   r   r	  r   )r?   rG  sortkeyr   	latestrevlastdater   rt   s   `     @@r$   	bookmarksrU    s    HH''--/D/qQ43883C/DA4Gqgt,As'F
 	aDG		xx	"'')H##'')*++gx-@,AB--gHE 11'H   / 	Es   D%D%   branchesc                *   [         R                  " U R                  U R                  5      n[         R                  " U R                  U R                  S5      nU R	                  S[        U R                  R                  R                  5       5      UUS9$ )z
/branches
---------

Show information about branches.

All known branches are contained in the output, even closed branches.

No arguments are accepted.

The ``branches`` template is rendered.
r   rV  )r   r   r  )r   branchentriesrK   r|   r   r   r=   r   )r?   r   r  s      r$   branchesrY    sv     ##CHHcoo>G''#//1EK##'')*	   r'      summaryc                0  ^ ^^	^
 [        T R                  R                  5       5      m	U	U 4S jnU 4S jnUU
U 4S jnT R                  S   n[        T R                  5      n[	        SUT R
                  -
  5      m
[        UT
T R
                  -   5      mT R                  SS5      nU(       d  SnT R                  SS	5      nT R                  S
U[        T R                  5      =(       d    SUR                  5       [        R                  " USS9[        R                  " U5      [        R                  " T R                  T R                   S5      [        R                  " USS9UR#                  5       ST R%                  S5      [        R&                  " USS9S9$ )z
/summary
--------

Show a summary of repository state.

Information about the latest changesets, bookmarks, tags, and branches
is captured by this handler.

The ``summary`` template is rendered.
c              3     >#    [        TR                  5      nSnT HP  u  p4US:X  a  M  US-  nUS:  a    g [        U5      U[        U5      TR                  U   R                  5       S.v   MR     g 7f)Nr   r   r   
   )rm   r6  r   r  )r   r|   rp   r   rK   r  )rq   rt   r   r'  r   r   r?   s        r$   
tagentriessummary.<locals>.tagentries  ss     3??+DAF{QJErz  <Q!))+	  s   A/A2c              3  z  >#    [        TR                  5      nTR                  R                  R	                  5        Vs/ s H  o"S   TR                  ;   d  M  UPM     nnU4S jn[        X4SS9nUS S  H;  u  pV[        U5      UTR                  U   R                  5       [        U5      S.v   M=     g s  snf 7f)Nr   c                N   > TR                   U S      R                  5       U S   4$ rD  rE  rF  s    r$   rH  ,summary.<locals>.bookmarks.<locals>.<lambda>  s#    SXXad^//11Q48r'   TrJ  r]  rM  )	r   r|   rK   rQ  r#  r  rp   r  r   )rq   rt   rG  marksrR  r'  r   r?   s          r$   rU  summary.<locals>.bookmarks  s     3??+HH//557L7qQ4388;K7L8u48#2JDA<!))+Q	   Ms   <B;B6B6AB;c              3  |  >#    [        T	R                  TT-
  S9n/ n/ nTT:  a)  T	R                  R                  R	                  TTS-
  5      nU HR  nT	R                  U   n[
        R                  " T	R                  U5      n[        U5      US'   UR                  U5        MT     [        U5       S h  vN   g  N7f)Noffsetr   rm   )
r   r|   rK   r=   r   r   r   rp   r*   r>  )
rq   rt   r   r   r   r   r   endstartr?   s
          r$   r   summary.<locals>.changelist  s     3??53;?3;88%%**5#':DA((1+C$$SXXs3B LByMHHRL	  A;s   B1B<4B:5B<r   r   rB   s   descriptions   unknowns   labelsrZ  s   tagentryr!   r]  s   shortlogentrys   label)descownerrP  r@  rU  rY  r
  r   rx   r   labels)r>  rK   r?  r   r   r   minconfig
configlistr   r   r  r   r   r   rX  r|   r   r   
hybridlist)r?   r^  rU  r   r   r   rk  rm  rh  r   ri  s   `       @@@r$   summaryrr    sH    	""$%A$ ((6
CME53>>)*E
eUS^^+
,C::fn-D^^FI.F#**%388:**:KH//	:&&sxx"E..-
 WWY(&&vH=   r'      filediffc           
        Su  p [         R                  " U R                  U R                  5      nUb   UR                  5       nUR                  5       nUR                  5       nU R                  SS5      nSU R                  R                  ;   a  U R                  R                  S   n[         R                  " XUW/U5      nUb  [         R                  " U5      nUnO[        R                  " / 5      nUnU R                   "  SU[         R"                  " U R                  U5      UUS.[$        R&                  " [         R(                  " U R                  U5      5      D6$ ! [         a{    [         R
                  " U R                  U R                  5      n[         R                  " U R                  U R                  R                  S   5      nX2R                  5       ;  a  e  GNf = f)z
/diff/{revision}/{path}
-----------------------

Show how a file changed in a particular commit.

The ``filediff`` template is rendered.

This handler is registered under both the ``/diff`` and ``/filediff``
paths. ``/diff`` is used in modern code.
)NNr8   rB   r   )rw   rx   ry   diff)rs  )r   rM   rK   r9   rN   r  rJ   r:   r   rO   p1ro  diffsr   r   r	  r   r   r   r   r   )r?   r^   r   rO   basectxstylerw  ry   s           r$   filediffrz  ?  s    IDsxx1 yy{nnffhGJJvx(E377###  *MM#GdVU;E##D)))"-((#6 

W003?
@ /  #''2  377+;+;G+DEyy{" #s   +E! !BG&%G&   diffs
   comparisonc                   [         R                  " U R                  U R                  5      nSU R                  R                  ;  a  [        [        S5      e[         R                  " U R                  U R                  R                  S   5      nS nSU R                  R                  ;   a   U" U R                  R                  S   5      nOU" U R                  SS5      5      nS nSnUR                  5       nUR                  5       nUR                  5       n	UR                  5       n
[        R                  " U5      nX!;   a!  X   nU" U5      nX';  a  S	nO*Xr   nU" U5      nOS	nUR                  5       U   nU" U5      n[         R                  " XMU5      nUb  [         R                  " U5      nUnO[         R"                  " / 5      nUnU R$                  "  SU[         R&                  " U R                  U5      UU[)        U	5      U
[)        U5      US
.[*        R,                  " [         R.                  " U R                  U5      5      D6$ )a  
/comparison/{revision}/{path}
-----------------------------

Show a comparison between the old and new versions of a file from changes
made on a particular revision.

This is similar to the ``diff`` handler. However, this form features
a split or side-by-side diff rather than a unified diff.

The ``context`` query string argument can be used to control the lines of
context in the diff.

The ``filecomparison`` template is rendered.
r8   s   file not givenc                B    U S:H  =(       a    S=(       d    [        U 5      $ )Ns   fullrE   )r   )r(  s    r$   rH  comparison.<locals>.<lambda>  s    Q'\0b:CF:r'   s   contextrB   s   comparisoncontextc                h   U R                  5       (       a  [        R                  " [        R                  " [        R
                  " U R                  5       5      5      S   =(       d    S5      n[        S5      U[        U R                  5       5      4-  /$ U R                  5       R                  5       $ )Nr   re   s   (binary file %s, hash: %s))isbinaryr   rU   rQ   rR   rS   rO   r   r   r}   rP   ro   )r   ra   s     r$   	filelinescomparison.<locals>.filelines  s    ::<<""$$X%6%6qvvx%@A!D /.B 34C

<M7NNOOvvx""$$r'   Nr6   )rw   rx   ry   leftrevleftnoderightrev	rightnode
comparison)s   filecomparison)r   r  rK   r9   r:   r	   r   rJ   ro  rv  r   r   r   r   comparer   r   r	  r   r   r   r   r   r   )r?   r   rO   parsecontextrq   r  r^   parentr  r  r  r  
rightlines	leftlinespfctxr  ry   s                    r$   r  r  s  s   " 

CHHcgg
.Ccgg&&&N,=>>SXXsww'7'7'@AD:LSWW%%%sww//
;<szz&2FGH% DVVXFjjlG{{}HwwyH$I{yt_
ILE!%(I
e$	Z@J##D)))"-((#6Xi. 

W003?
@ r'      annotatec                  ^ ^^^^	 [         R                  " T R                  T R                  5      mTR	                  5       n[        T R                  5      m	TR                  5       TR                  5       R                  5       ;   n0 mU4S jmUUU	U 4S jn[         R                  " T R                  T R                  R                  S5      nUR                   Vs0 s H#  oU[        U[        R                  " U5      5      _M%     nnT R                   "  SU["        R$                  " U5      [         R&                  " U5      [         R(                  " T R                  T5      [         R*                  " T5      TR-                  5       R/                  U5      [1        U5      ["        R2                  " U5      S.[        R4                  " [         R6                  " T R                  T5      5      D6$ s  snf )a  
/annotate/{revision}/{path}
---------------------------

Show changeset information for each line in a file.

The ``ignorews``, ``ignorewsamount``, ``ignorewseol``, and
``ignoreblanklines`` query string arguments have the same meaning as
their ``[annotate]`` config equivalents. It uses the hgrc boolean
parsing logic to interpret the value. e.g. ``0`` and ``false`` are
false and ``1`` and ``true`` are true. If not defined, the server
default settings are used.

The ``fileannotate`` template is rendered.
c              3     >#    UR                  5       nUT;  aQ  / TU'   UR                  5        H8  nUR                  5       UR                  5       S.nTU   R                  U5        M:     TU    H  nUv   M	     g 7f)N)r   r   )r   parentsr   r*   )rq   r   r   pentryparentscaches        r$   r  annotate.<locals>.parents  sw     eegl" "LYY[UUWEEG S!((/ ! c"AG #s   A9A<c              3     >#    TR                  5       (       a  [        R                  " [        R                  " [        R
                  " TR                  5       5      5      S   =(       d    S5      n[        R                  " TR                  TR                  5       5      SSU-  S9/nO6[        R                  " TR                  TTR                  R                  5      nS n[!        S5      n[#        U5       GH  u  pVUR$                  nUR'                  5       nX:w  a  Sn	[)        U5      n
OS n	Un0 S[)        T5      _SUR+                  5       _S	U_S
UR-                  5       _S[.        R0                  " TU4S9_SUR3                  5       _SUR5                  5       _SUR                  5       _SU	_SW
_SUR6                  _SUR8                  _SUS-   _SSUS-   -  _SSUS-   -  _SUR;                  5       _v   GM     g 7f)Nr   re   r   rf   )r^   rr   r`   Trm   r   r   s   authors   parentsr;  s   descs   extrar8   s	   blockheads   blockparitys
   targetlinerj   s   linenork   rh   rl   ri   s   revdate)r  r   rU   rQ   rR   rS   rO   r   annotatelinerM   filerevr   annotater9   rK   r   r   rn   r^   r   rp   r   r   r   r   r   extrarr   r`   r  )rq   ra   ru   previousrevblockparitygenrr   aliner   r   	blockheadblockparityr^   r  rt   r?   s              r$   r  annotate.<locals>.annotate  s    ==??""$$X%6%6tyy{%CDQG /.B
 ""dlln5'",E $$SWWdCHHKK@E"1&u-MF

A%%'C! 	">2 	K4<  1668	
 L99'M  !'')  i  u||  6A: 6VaZ0 w&1*5  AFFH!  .s   G;G>r  )rw   r  rO   rx   ry   rz   r{   diffopts)s   fileannotate)r   rM   rK   r9   rO   r   r|   r}   r<   r~   difffeatureoptsr   r   getattrr   r+   r   r   r   r   r   r   rL   r   r   
hybriddictr   r   )
r?   r   r{   r  r  r'  r^   r  r  rt   s
   `     @@@@r$   r  r    ss   " ??388SWW-D		As'F]]_ 4 4 66F L, ,\ &&sww[IH:B:K:K:KQ78X__Q/00:K   ..x8ZZ](($7!!$'MMO))!,6{((2 

W004@
A 	s   *G*   filelogc                  ^ ^$  [         R                  " T R                  T R                  5      nUR	                  5       nUR                  5       nT R                  nST R                  R                  ;   aX   [!        T R                  R                  R#                  SU5      5      n[%        US5      nUT R&                  R(                  S   S'   [         R,                  " T R                  5      n	[.        R.                  " T R&                  R(                  S   5      n
[%        US-  S5      U
S'   [.        R.                  " T R&                  R(                  S   5      nUS-  US'   ST R                  R                  ;   nU(       a!  T R                  R                  S   =U
S'   US'   ST R                  R                  ;   nU(       a!  T R                  R                  S   =U
S'   US'   UR1                  5       S-   n[%        SX-
  5      n[3        XU-   5      n[5        T R6                  UU-
  S	9nT R                  nUR                  5       nUR9                  UUS-
  5       Vs/ s H  nUR                  U5      U;   d  M  UPM     nn/ nT R;                  S
S5      m$ST R                  R                  ;   a  T R                  R                  S   m$SU$U 4S jjnSnU	Gb@  U	c   e[         R<                  " U	6 n[>        R@                  " / 5      nU(       a  [B        RD                  " U/U	Q76 nO[B        RF                  " U/U	Q76 n[I        US5       H  u  nu  nnSnU(       a  U" UUS9nUR	                  5       n[         RJ                  " UU5      n U RM                  [O        U5      UR                  5       UU[         R<                  " U6 [>        R@                  " / 5      S.5        URQ                  U 5        UU:X  d  M    O   [         R<                  " U	6 U
S'   U
S   US'   OU H  nUR                  U5      n!SnU(       a  U" U!5      n[         RJ                  " UU!5      n U RM                  [O        U5      UUU[         RR                  " U!5      S.5        URQ                  U 5        M     URU                  5         [         RV                  " T R                  UR	                  5       5      n"U"RY                  US-
  X5      nUSS n#T RZ                  "  SUU[         R\                  " T R                  U5      [>        R@                  " U5      UU[>        R@                  " U#5      UUUU
S.[^        R`                  " [         RJ                  " T R                  U5      5      D6$ ! [        R                   Ga    [         R                  " T R                  T R                  R                  S   5      nT R                  R                  U5      n[        U5      nU(       d  e [         R                  " T R                  T R                  5      R                  5       nUR                  S5      nXV:  a  e US-
  nUR                  U5      U:  a  US-  nUR                  U5      U:  a  M  T R                  R                  X#R                  U5      5      n GNof = f! [*         a     GNf = fs  snf )a  
/filelog/{revision}/{path}
--------------------------

Show information about the history of a file in the repository.

The ``revcount`` query string argument can be defined to control the
maximum number of entries to show.

The ``filelog`` template will be rendered.
r8   r   r   r   r   r   s   patchs   descendrf  rB   r   Nc                   > U R                  5       nUR                  5       nU R                  5       n[        R                  " TUUU/TUSUR                  5       S S -  S9$ )Ns   %s-   )	linerangelineidprefix)r  rv  rO   r   rw  r   )r^   r  r   rx  rO   	diffstyler?   s        r$   ru  filelog.<locals>.diffx  s^    nn&&(yy{}}F#'')CR.0
 	
r'   )r  )rm      filerevr8   r{  	   linerange   renamer  )rm   r  r8   r{  r  )rw   navrx   r   descendpatchr  r  r   r   r   r    )r  )1r   rM   rK   r9   rO   r<   r   rN   rJ   r:   rw   r   r  r   linkrevr  r   r;   r   r   r   r   r  r   r  rn  r   r|   r   ro  formatlineranger   r	  r   blockdescendantsblockancestorsrn   r   r   rp   r*   r   r   
filerevnavr  r   r   r   r   )%r?   r^   r   flnumrevsr   firstfrevr   lranger   r   r  r  r   ri  rh  rt   rK   r<   r  r   r   ru  r  r  itr   clrrw  rO   r   iterfctxr  r  r  s%   `                                   @r$   r<   r<   ,  s   5sxx1IIK\\^  ""Hcgg&&&	377++//XFGH8Q'H=ECHHn-k: sww'Fyy**>:;HAq1H[yy**>:;H$qLH[(((E25''2B2B82LLXh/CGG,,,G69gg6F6F7
 	
x
3 LLNQE5#$E
eX%
&Csus{;F88DllnG ||E3733G??7#t+ 	3 	 
 G

68,I377###GG$$X.	
 
 I!!!++V4	 &&r*''6v6B%%d4V4B#B*JAw2EQ"-668D$$T1-BII#F| !!"")"9"92">+77;	 NN2H}' +( ")!8!8&!A!),!7A||AHEX$$T84BII#F| !"&11(; NN2   	##CHHdiik:jjq(2"1+K(($7((1 ,,[9 

W004@
A A  5chh(8(8(ABXX]]1b'#''2668

1;{jj$AID jj$xx::d#345*  		4s8   AV 6A[ [9[C?Z?*Z?>Z?
[[s   archivec                .  ^ ^^^^ T R                   R                  R                  S5      nT R                  SS5      nT R                   R                  S   nU[        R
                  ;  a  Sn[        [        U5      eX;   d,  T R                  SSU-   5      (       d  Sn[        [        U5      e[        R                  " SS	[        R                  R                  T R                  5      5      nT R                   R#                  U5      nUnXc:X  d  US
:X  a  [%        U5      nSXW4-  m[        R&                  " T R                   T R                   5      n[(        R*                  " U/ 5      n	T R                   R                  R                  S5      n
U
(       au  SU
-   /n[(        R*                  " XSS9n	U(       aS  UR-                  5       R/                  5        Vs/ s H  o" U5      (       d  M  UPM     nnU(       d  [        [        S5      e[        R
                  U   u  mnmmT R                   R0                  S:X  a  / $ UUUUU 4S jn[2        R4                  " T R                   UUUTU	T R                  SS5      S9nUS:X  a  [        [        S5      e/ $ s  snf )a  
/archive/{revision}.{format}[/{path}]
-------------------------------------

Obtain an archive of repository content.

The content and type of the archive is defined by a URL path parameter.
``format`` is the file extension of the archive type to be generated. e.g.
``zip`` or ``tar.bz2``. Not all archive types may be allowed by your
server configuration.

The optional ``path`` URL parameter controls content to include in the
archive. If omitted, every file in the specified revision is present in the
archive. If included, only the specified file or contents of the specified
directory will be included in the archive.

No template is used for this handler. Raw, binary content is generated.
s   typerB   s   allow-archiver   s   Unsupported archive types   allows   Archive type not alloweds   \W+   -r   s   %s-%sr8   s   path:r  )defaults   file(s) not founds   HEADc                   > TTR                   R                  S'   STT4-  TR                   R                  S'   T (       a  T TR                   R                  S'   TR                   R                  5         [        TR                   R	                  5       5      (       a  [
        R                  " S5      eTR                   R                  5       $ )zOpen the output "file" for the archiver.

This function starts the streaming response. Error reporting
after this point will result in short writes without proper
diagnostics to the client.
rC   s   attachment; filename=%s%srH   s   Content-Encodings4   sendresponse() should not emit data if writing later)rW   rX   setbodywillwriter  r\   r   ProgrammingErrorgetbodyfile)r   	extensionmimetyper"   r?   s   r$   open_archivearchive.<locals>.open_archive  s     ,4( ),
 
 	"	
 3;CGGOO/0  "$$&''((G  ww""$$r'   s   archivesubrepos)prefixr   subreposr   s   no files found in changeset)r9   r:   r;   rp  r   archivespecsr	   r   rI   r
   resubosrO   basenamereponamerK   r   r   r  r   r   rL   keysmethodr   archive)r?   type_allowedrK  msgr  cnodearch_versionr   r   rw   patsr   r   artyper  totalr   r  r  r"   s   `                @@@@r$   r  r    s(   * GG  )EnnV%56G
''

7
#CG((( *NC00vx%7G H H *NC00vvgtRWW%5%5cll%CDHHHOOC EL|sf}U|x..D


CHHcgg
.CMM#r"E77(D4 c9 # 3 3 5B 51qQ 5EB $N4HII,3,@,@,G)Hfi
ww~~ 	% %4 (:;E zN,JKKIe Cs   J)J   staticc                    U R                   R                  S   nU R                  SSSS9n[        U R                  X!U R
                  5        U R
                  R                  5       $ )Nr8   rB   r  F)	untrusted)r9   r:   ro  r   templatepathrW   r\   )r?   fnamestatics      r$   r  r  7  sU    GGW%E ZZ	UZ;Fs877!!r'      graphc                .  ^ ^^^^ ST R                   R                  ;   aM  [        R                  " T R                  T R                   5      n[        R
                  " T R                   U5      nOT R                  S   nSnUR                  5       nSnT R                  nST R                   R                  ;   aX   [        T R                   R                  R                  SU5      5      n[        US5      nUT R                  R                  S   S'   [        R                  " T R                  R                  S   5      n[        US-  S5      US'   [        R                  " T R                  R                  S   5      nUS-  US'   T R                   R                  R                  SUR                  5       5      m[        R                  " T R                  R                  S   5      nTUS'   [!        T R                  5      n	Un
[#        [        S	U	S-
  5      X5-   5      n[        S	X5-
  5      n[        R$                  " T R                  5      R'                  XU	5      n/ m/ nS	mU
S
:w  Ga  T R                  R(                  R+                  U
S	5      n/ nU H(  nUR-                  U5        [!        U5      US-   :  d  M(    O   [!        U5      U:  a7  [        R.                  " T R                  T R                  US
      5      /nUSS
 nUS
   m[0        R2                  " T R                  [4        R6                  " U5      5      n[9        S [0        R:                  " UT R                  5       5       5      mUUU 4S jmUU 4S jnUU 4S jn[!        T5      nT R=                  SUUUUUUUUUUU	[>        R@                  " U5      [>        RB                  " U5      [>        RB                  " U5      UR                  5       T RE                  S5      US9$ ! [         a     GNf = f)a  
/graph[/{revision}]
-------------------

Show information about the graphical topology of the repository.

Information rendered by this handler can be used to create visual
representations of repository topology.

The ``revision`` URL parameter controls the starting changeset. If it's
absent, the default is ``tip``.

The ``revcount`` query string argument can define the number of changesets
to show information for.

The ``graphtop`` query string argument can specify the starting changeset
for producing ``jsdata`` variable that is used for rendering graph in
JavaScript. By default it has the same value as ``revision``.

This handler will render the ``graph`` template.
r   r   '   r   r   r   r   s   graphtopr   rE   Nc              3  X   #    U  H   nUS    [         R                  :X  d  M  Uv   M"     g7fr   Nr   	CHANGESETr   items     r$   r   graph.<locals>.<genexpr>  s+      
7Aw(,,, D7   *	*c                 j  > TR                   T   R                  5       n / nU S:w  a  TR                   R                  R                  U T5      n[        R
                  " TR                   [        R                  " U5      5      n[        S [        R                  " UTR                   5       5       5      nU$ )NrE   c              3  X   #    U  H   nUS    [         R                  :X  d  M  Uv   M"     g7fr  r  r  s     r$   r   *graph.<locals>.fulltree.<locals>.<genexpr>  s+      ;D7h000 ;r  )
rK   r   r=   r   r   	dagwalkerr   basesetr  colored)r   r   r   daggraphtoplastrevr?   s       r$   fulltreegraph.<locals>.fulltree  s    hhx $$&"988%%**38D$$SXXx/?/?/EFC $,,S#((; D
 r'   c              3     >#    T" 5        HC  u  pp4n[         R                  " U5      [        R                  " TR                  U5      UUS.v   ME     g 7f)N)r   s	   graphnodes   vertex   edges)r   bytestrr   getgraphnoderK   )rq   idtyper   vtxedgesr  r?   s         r$   jsdatagraph.<locals>.jsdata  sK     )1%Bc!))#.%22388SA	  *4s   AAc           
   3    >#    [        TR                  5      n[        T5       H  u  nu  p4pVn[        R                  " TR
                  U5      nU V	s/ s H#  n	U	S   U	S   U	S   S-
  S-  S-   U	S   U	S   S.PM%     n
n	UR                  US   US   S-
  S-  S-   [        U5      [        R                  " U
5      UUS-   S.5        Uv   M     g s  sn	f 7f)	Nr   r   r      r      )   cols   nextcol   colors   widths   bcolor)r  r	  rm   r  s   rows   nextrow)
r   r|   rn   r   r   rK   r   rp   r   r	  )rq   rt   rowr  r   r   r  r  r  edgeedgedatar   r?   s              r$   nodesgraph.<locals>.nodes  s     3??+09$,C,"Ce''#6E "	 "D !G $Q#Aw{a/!3"1g#Aw "  	 LLF"1vzQ.2#F|*66x@ #a	 K1 1@	s   AC*C=ACr  )r   rx   r   uprevr   r   downrev	graphvarsrows	bg_heightr  r  r  r  r   r   r   )#r9   r:   r   r  rK   r   r   r  r   r;   r   r   r   r   r   r   r   rn  r  r  r=   r   r*   r   r   r  r   r  r  r  r   r   r	  r   r   )r?   r   rx   r   r  r   r   r   r  r   r   r  r  r   r  allrevsr   r   r  r  r  r  r  r  r  r   s   `                     @@@@r$   graphr  A  sq   0 #''"""#''2**377C8hhv
'')CI""Hcgg&&&	377++//XFGH8Q'H=ECHHn-k: yy**>:;HAq1H[yy**>:;H$qLH[ww##K;H		#((++N;<I%IkME
CAuqy!3>2E!S^$Gsxx(,,SEBIDIG
by(($$))#q1AKKN4yHqL( 
 t9x ,,SXXsxxR7IJKI9Dr(
   8+;+;D+AB 
 ((chh7
 
8 t9D**95,,V4++E2WWY(%   G  		s   7AP 
PPc                    U S   R                   nU(       a  [        U5      R                  S5      S   nU$ [        S5      nU$ )Nr      
s   (no help text available))r4   r   	partition)edocs     r$   _getdocr    sD    
A$,,C
fu%a( J +,Jr'      helpc                  ^^^ SSK JnJm  U R                  R                  R                  S5      nU(       Gd  U4S jn/ / smmS nUR                  R                  5        Hq  u  pV[        U5      nSU;   d  UR                  S5      (       a  M.  U" U5      n[        US   S	S
5      (       a  TR                  X45        M_  TR                  X45        Ms     TR                  5         TR                  5         U4S jn	U4S jn
U R                  S[        R                  " U5      [        R                  " U	5      [        R                  " U
5      SS9$ UTR                   ;   a`  / nTR                   U    H%  u  pnUR                  SX+S   4-  US   US.5        M'     U R                  S[        R"                  " U5      USS9$ [$        R&                  R)                  5       nSUl        SU;   a5  UR-                  SS5      u  nnUTR                   ;  a  [/        [0        5      eOUnSn TR3                  XUUS9nU R                  SX'S9$ ! [4        R6                   a    [/        [0        5      ef = f)au  
/help[/{topic}]
---------------

Render help documentation.

This web command is roughly equivalent to :hg:`help`. If a ``topic``
is defined, that help topic will be rendered. If not, an index of
available help topics will be rendered.

The ``help`` template will be rendered when requesting help for a topic.
``helptopics`` will be rendered for the index of help topics.
r   )r,   helpr   c              3  X   >#    TR                    H  nUSS u  p#nUS   US.v   M     g 7f)Nr   r      topicrZ  )	helptable)rq   r&  r   rr  _dochelpmods        r$   topicshelp.<locals>.topics  s5     &&)*1Q&$!(AA 's   '*c                *    U R                  S5      S   $ )N   |r   )r  )ss    r$   rH  help.<locals>.<lambda>  s    AKK-a0r'   s
   DEPRECATEDs   debugr   	helpbasicFc              3  0   >#    T H  u  pXS.v   M     g 7fNr   r6   )rq   r  r  earlys      r$   earlycommandshelp.<locals>.earlycommands       !"44     c              3  0   >#    T H  u  pXS.v   M     g 7fr-  r6   )rq   r  r  others      r$   othercommandshelp.<locals>.othercommands  r1  r2  s
   helptopicss   Index)r%  r/  r5  titles   %s.%s)r!  r  rZ  T)r%  r7  subindex   .r   N)subtopicr  )topicr  ) r,   r  r9   r:   r;   tabler#  r  rV   r  r*   sortr   r   r   	subtopicsr	  r   wsgiuiloadverboser   r	   r   help_r   r   )r?   r,   	topicnamer%  primaryr  r  r  cmdr/  r5  r   rr  r#  ur;  r:  r.  r$  r4  s                    @@@r$   r  r    sY    -  $$W-I	B
 2u0NN((*DA!*C#q||H'='=!*Cqt[%00cZ(cZ( + 	



	5	5 008&77F&77F   
 	
 G%%%&-&7&7	&B"GdMM&)QZ)@@!( ' 'C ++F3	   
 	
 	AAI y $//$2x)))// * ,mmAmB G9>> ;; ,N++,s   &I $I+rO  )rO   bytesreturnrH  )?
__future__r   r   rQ   r  r  i18nr   r   r   r   commonr	   r
   r   r   r   r   r<  r   r   r   r   r   r   r   r   r   r   r   utilsr   r   r)   r,   r   r@   rc   r   rw   r   r=   r
  r  r   r  rL   r@  rU  rY  rr  rz  ru  r  r  r<   r  r  r  r  r  valuesi18nfunctionsr6   r'   r$   <module>rP     s   #   	 	        
 @ F , J'" '"T F G DfR LY Yx K) ) LN N( # Ki iX G" "J L( (V K 0 JT Tn K- -` '8$ MJ JZ Kg gT J_ _D Jd dN I" " H\ \~ G]? ]?B !r'   