
    q&f@                     $   d dl mZ d dlmZmZ d dlmZmZmZ i Z	e	j                  ej                  j                          ej                  e	      Z edddg  ed       ed      fd	d
g  ed       ed      fgej                        d        Zy)   )_)chainsawverify)error	registrartransactions   admin::verify   cs   checks   add a checks   CHECK   os   options   pass an option to a checks   OPTION)helpcategoryc                    |j                         j                  d      st        j                  t	        d            t        j                  |      r| j                  t	        d             |j                  dg       }|j                  dg       }t        j                  || ||      }| j                  t	        d      t        |      z         t        |j                         d 	      D ]R  \  }}| j                  t	        d
      |z          |       }|s-| j                  t	        d      t        |      z         T y)zverify the integrity of the repository

    Alternative UI to `hg verify` with a lot more control over the
    verification process and better error reporting.
    s   file:s$   cannot verify bundle or remote reposs-   abandoned transaction found - run hg recover
checkoption)namesoptionss   running %d checks
c                     | d   S )N     )xs    :/usr/lib/python3/dist-packages/mercurial/admin_commands.py<lambda>zadmin_verify.<locals>.<lambda>.   s
    !A$     )keys   running %s
s   found %d errors
N)url
startswithr   Abortr   r   has_abandoned_transactionwarngetr   
get_checksstatuslensorteditems)	uirepooptschecksr   funcsnamefuncerrorss	            r   admin_verifyr,      s     88:  *kk!CDEE,,T2
CDEXXgr"Fhhx$GdBfgFEIIa&'#e*45U[[]? ;
d
		!O$t+,GGA*+c&k9:	;r   N)i18nr   adminr   r    r   r   r   tableupdatecommand_tableCATEGORY_MAINTENANCEr,   r   r   r   <module>r5      s     # + + 	 X$$ %
)

E
" 		xQ~.(<	y"a <=q|L --;;r   