a
    %0_k	                     @   s   d Z ddlmZ ddlmZ ddlmZmZmZm	Z	m
Z
 ejZi Ze	eZdZedddd	ed
edfge edejdddddZdS )zcommand to display child changesets (DEPRECATED)

This extension is deprecated. You should use :hg:`log -r
"children(REV)"` instead.
    )absolute_import)_)cmdutil
logcmdutilpycompat	registrarscmutils   ships-with-hg-cores   children   r   rev   .s'   show children of the specified revisions   REVs   hg children [-r REV] [FILE]T)ZhelpcategoryZ	inferrepoNc           
      K   s   t |}|d}t||}|rJ|j|| d}dd | D }n| }t	| ||}|D ]}	|
|	 qd|  dS )aG  show the children of the given or working directory revision

    Print the children of the working directory's revisions. If a
    revision is given via -r/--rev, the children of that revision will
    be printed. If a file argument is given, revision in which the
    file was last changed (after the working directory revision or the
    argument to --rev if given) is printed.

    Please use :hg:`log` instead::

        hg children => hg log -r "children(.)"
        hg children -r REV => hg log -r "children(REV)"

    See :hg:`help log` and :hg:`help revsets.children`.

    r
   )Zchangeidc                 S   s   g | ]}|  qS  )Z	changectx).0Zfcctxr   r   0/usr/lib/python3/dist-packages/hgext/children.py
<listcomp>M       zchildren.<locals>.<listcomp>N)r   Zbyteskwargsgetr   Z	revsingleZfilectxrevchildrenr   ZchangesetdisplayerZshowclose)
ZuiZrepoZfile_Zoptsr   ctxZfctxZ	childctxsZ	displayerZcctxr   r   r   r   '   s    !

r   )N)__doc__Z
__future__r   Zmercurial.i18nr   Z	mercurialr   r   r   r   r   ZtemplateoptsZcmdtableZcommandZ
testedwithZCATEGORY_CHANGE_NAVIGATIONr   r   r   r   r   <module>   s.   
	
