§
    	^µc[c  ã                   ó˜  — d Z ddlZddlZddlZddlZddlZddlmZ ddlm	Z	m
Z
 ddlmZmZmZmZmZmZmZmZmZmZmZ ddlmZmZ i Z ej        e¦  «        Zi Z ej        e¦  «        Z eddd	d
¬¦  «          eddd
¬¦  «          edddd
¬¦  «          eddd
¬¦  «         dZd„ Zd„ Z d<d„Z!d„ Z"d„ Z#d„ Z$d=d„Z%ddg  ed¦  «         ed¦  «        fddg  ed ¦  «         ed!¦  «        fd	d"d	 ed#¦  «         ed$¦  «        fd	d%d	 ed&¦  «         ed'¦  «        fd(d)d	 ed*¦  «         ed!¦  «        fd	d+d ed,¦  «        fd	d-d ed.¦  «        fd	d/d ed0¦  «        fgej&        z   ej'        z   Z( edd1d2d	 ed3¦  «         ed4¦  «        fge(z    ed5¦  «        ej)        d
¬6¦  «        d7„ ¦   «         Z* G d8„ d9¦  «        Z+d:„ Z,d;„ Z-e+gZ.dS )>aB  command to allow external programs to compare revisions

The extdiff Mercurial extension allows you to use external programs
to compare revisions, or revision with working directory. The external
diff programs are called with a configurable set of options and two
non-option arguments: paths to directories containing snapshots of
files to compare.

If there is more than one file being compared and the "child" revision
is the working directory, any modifications made in the external diff
program will be copied back to the working directory from the temporary
directory.

The extdiff extension also allows you to configure new diff commands, so
you do not need to type :hg:`extdiff -p kdiff3` always. ::

  [extdiff]
  # add new command that runs GNU diff(1) in 'context diff' mode
  cdiff = gdiff -Nprc5
  ## or the old way:
  #cmd.cdiff = gdiff
  #opts.cdiff = -Nprc5

  # add new command called meld, runs meld (no need to name twice).  If
  # the meld executable is not available, the meld tool in [merge-tools]
  # will be used, if available
  meld =

  # add new command called vimdiff, runs gvimdiff with DirDiff plugin
  # (see http://www.vim.org/scripts/script.php?script_id=102) Non
  # English user, be sure to put "let g:DirDiffDynamicDiffText = 1" in
  # your .vimrc
  vimdiff = gvim -f "+next" \
            "+execute 'DirDiff' fnameescape(argv(0)) fnameescape(argv(1))"

Tool arguments can include variables that are expanded at runtime::

  $parent1, $plabel1 - filename, descriptive label of first parent
  $child,   $clabel  - filename, descriptive label of child revision
  $parent2, $plabel2 - filename, descriptive label of second parent
  $root              - repository root
  $parent is an alias for $parent1.

The extdiff extension will look in your [diff-tools] and [merge-tools]
sections for diff tool arguments, when none are specified in [extdiff].

::

  [extdiff]
  kdiff3 =

  [diff-tools]
  kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child

If a program has a graphical interface, it might be interesting to tell
Mercurial about it. It will prevent the program from being mistakenly
used in a terminal-only environment (such as an SSH terminal session),
and will make :hg:`extdiff --per-file` open multiple file diffs at once
instead of one by one (if you still want to open file diffs one by one,
you can use the --confirm option).

Declaring that a tool has a graphical interface can be done with the
``gui`` flag next to where ``diffargs`` are specified:

::

  [diff-tools]
  kdiff3.diffargs=--L1 '$plabel1' --L2 '$clabel' $parent $child
  kdiff3.gui = true

You can use -I/-X and list of file or directory names like normal
:hg:`diff` command. The extdiff extension makes snapshots of only
needed files, so running the external diff program will actually be
pretty fast (at least faster than having to compare the entire tree).
é    N)Ú_)ÚnullrevÚshort)ÚarchivalÚcmdutilÚencodingÚerrorÚ	filemergeÚ	formatterÚ
logcmdutilÚpycompatÚ	registrarÚscmutilÚutil)ÚprocutilÚ
stringutiló   extdiffs   opts\..*ó    T)ÚdefaultÚgenerics   gui\..*)r   ó
   diff-toolss   .*\.diffargs$s   .*\.gui$s   ships-with-hg-corec           
      ó¶  — t           j                             |j        ¦  «        }|dk    rd}|�d|t	          |¦  «        fz  }t           j                             ||¦  «        }t          j        |¦  «         g }|�B|                      t          d¦  «        t          |¦  «        t	          |¦  «        fz  ¦  «         n2|                      t          d¦  «        t          |¦  «        z  ¦  «         |ræ|j
                             ddd	¦  «         t          j        |||d
t          j        ||¦  «        |¬¦  «         t!          |¦  «        D ]�}	t#          j        |	¦  «        }
|                      d|
z  ¦  «         |€]t           j                             ||
¦  «        }|                     ||                     |	¦  «        t          j        |¦  «        f¦  «         ŒŽ||fS )zŸsnapshot files as of some revision
    if not using snapshot, -I/-X does not work and recursive diff
    in tools like kdiff3 and meld displays too many files.r   ó   rootNs   %s.%ss(   making snapshot of %d files from rev %s
s3   making snapshot of %d files from working directory
s   uis   archivemetaFs   files)ÚmatchÚsubreposs     %s
)ÚosÚpathÚbasenameÚrootr   ÚjoinÚmkdirÚnoter   ÚlenÚuiÚ	setconfigr   Úarchiver   Ú
matchfilesÚsortedr   ÚpconvertÚappendÚwjoinÚlstat)r$   ÚrepoÚfilesÚnodeÚtmprootÚlistsubreposÚdirnameÚbaseÚ
fnsandstatÚfnÚwfnÚdests               ú//usr/lib/python3/dist-packages/hgext/extdiff.pyÚsnapshotr9   ™   sÒ  € õ Œg×Ò˜tœyÑ)Ô)€GØ�#‚~€~ØˆØÐØ˜g¥u¨T¡{¤{Ð3Ñ3ˆÝŒ7�<Š<˜ Ñ)Ô)€DÝ„HˆT�N„N€NØ€JàÐØ
�ŠÝÐ:Ñ;Ô;Ý�5‰zŒz�5 ™;œ;Ð'ñ(ñ	
ô 	
ð 	
ð 	
ð
 	�ŠÝÐEÑFÔFÝ�5‰zŒzññ	
ô 	
ð 	
ð
 ð JØŒ×Ò˜% °Ñ7Ô7Ð7åÔØØØØÝÔ$ T¨5Ñ1Ô1Ø!ð	
ñ 	
ô 	
ð 	
õ ˜‘-”-ð 	Jð 	JˆBÝ”- Ñ#Ô#ˆCØ�GŠG�I ‘OÑ$Ô$Ð$àˆ|Ý”w—|’| D¨#Ñ.Ô.�à×!Ò! 4¨¯ª°B©¬½¼À$¹¼Ð"HÑIÔIÐIøØ�JÐÐr   c	           	      ó�   ‡‡— ||||||||dœŠˆˆfd„}	d}
‰st          j        |
| ¦  «        s| dz  } t          j        |
|	| ¦  «        S )N)s   parents   parent1ó   parent2s   plabel1s   plabel2s   childs   clabelr   c                 ó¦   •— |                       d¦  «        }|                       d¦  «        }‰s|dk    r|S |t          j        ‰|         ¦  «        z   S )Né   é   r;   )Úgroupr   Ú
shellquote)r   ÚpreÚkeyÚdo3wayÚreplaces      €€r8   Úquotezformatcmdline.<locals>.quoteá   sR   ø€ Ø�kŠk˜!‰nŒnˆØ�kŠk˜!‰nŒnˆØð 	˜# Ò+Ð+ØˆJØ•XÔ(¨°¬Ñ6Ô6Ñ6Ð6r   sJ   (['"]?)([^\s'"$]*)\$(parent2|parent1?|child|plabel1|plabel2|clabel|root)\1s    $parent1 $child)ÚreÚsearchÚsub)ÚcmdlineÚ	repo_rootrC   Úparent1Úplabel1Úparent2Úplabel2ÚchildÚclabelrE   ÚregexrD   s     `        @r8   ÚformatcmdlinerR   È   s�   øø€ ð ØØØØØØØð	ð 	€Gð7ð 7ð 7ð 7ð 7ð 7ð	Eð 
ð ð '�"œ) E¨7Ñ3Ô3ð 'ØÐ&Ñ&ˆÝŒ6�%˜ Ñ(Ô(Ð(r   c           
      óö   — t          j        |¦  «        }t          j        t          j        | ¦  «        dt           j        t          j        |¦  «        t          j        t           j        |¦  «        ¬¦  «        }|S )zflike 'procutil.system', but returns the Popen object directly
    so we don't have to wait on it.
    T)ÚshellÚ	close_fdsÚenvÚcwd)	r   ÚshellenvironÚ
subprocessÚPopenÚtonativestrÚclosefdsÚtonativeenvr   Úrapply)ÚcmdÚenvironrW   rV   Úprocs        r8   Ú_systembackgroundrb   ò   si   € õ Ô
 Ñ
(Ô
(€CÝÔÝÔ˜SÑ!Ô!ØÝÔ#ÝÔ  Ñ%Ô%ÝŒO�HÔ0°#Ñ6Ô6ðñ ô €Dð €Kr   c                 ó¬  — g }t          |¦  «        }t          t          |¦  «        ¦  «        D �]X\  }}t          j                             ||¦  «        }||z   }t          j                             |¦  «        st          j        }d}d}|rPt          j                             |	|¦  «        }||z   }t          j                             |¦  «        st          j        }t          j                             |
|¦  «        }||z   }|rÑt          d¦  «        ||dz   |fz  }t          d¦  «        }| 
                    d||fz  ¦  «        }|dk    rs|dk    rm|                     |¦  «        d         D ]1\  }}|                     d|t          j        |¦  «        fz  ¦  «         Œ2| 
                    d||fz  ¦  «        }|dk    °m|dk    rn|dk    r�Œœ|d	k    r n¶t          | ||||||||¬
¦	  «	        }|s|sF|                     dt          j        |¦  «        |fz  ¦  «         |                     ||d¬¦  «         �Œ|                     dt          j        |¦  «        |fz  ¦  «         t'          ||¬¦  «        }|                     |¦  «         �ŒZ|rJ|                     d¦  «        5  |D ]}|                     ¦   «          Œ	 d d d ¦  «         d S # 1 swxY w Y   d S d S )Nr   s   diff %s (%d of %d)é   sZ   [Yns?]$$ &Yes, show diff$$ &No, skip this diff$$ &Skip remaining diffs$$ &? (display help)s   %s %sr>   s   %s - %s
r   r=   ©rC   rK   rL   rM   rN   rO   rP   ó   running %r in %s
r   ©rW   Ú
blockedtags    running %r in %s (backgrounded)
)rW   )r#   Ú	enumerater(   r   r   r    Úisfiler   Ú	osdevnullr   ÚpromptchoiceÚextractchoicesÚwriter   ÚlowerrR   ÚdebugÚbytestrÚsystemrb   r*   ÚtimeblockedsectionÚwait)rI   rJ   r$   ÚguitoolrC   ÚconfirmÚcommonfilesr0   Údir1aÚdir1bÚdir2Úrev1aÚrev1bÚrev2Ú	waitprocsÚ
totalfilesÚidxÚ
commonfileÚpath1aÚlabel1aÚpath1bÚlabel1bÚpath2Úlabel2Ú	difffilesÚ	responsesÚrÚcÚtÚ
curcmdlinera   s                                  r8   Ú_runperfilediffrŽ     s�  € ð& €IÝ�[Ñ!Ô!€JÝ$¥V¨KÑ%8Ô%8Ñ9Ô9ð L#ñ L#‰ˆˆZÝ”—’˜e ZÑ0Ô0ˆØ˜uÑ$ˆÝŒw�~Š~˜fÑ%Ô%ð 	(ÝÔ'ˆFàˆØˆØð 	,Ý”W—\’\ %¨Ñ4Ô4ˆFØ  5Ñ(ˆGÝ”7—>’> &Ñ)Ô)ð ,Ý!Ô+�å”—’˜T :Ñ.Ô.ˆØ˜dÑ"ˆàð 	åÐ/Ñ0Ô0ØØ�a‘Øð4ñ ˆIõ
 ð(ñô ˆIð —’ ¨I°yÐ+AÑ AÑBÔBˆAØ�AŠvˆvØ˜1’f�fØ "× 1Ò 1°)Ñ <Ô <¸QÔ ?ð Hð H™˜˜1ØŸš °µH´NÀ1Ñ4EÔ4EÐ0FÑ!FÑGÔGÐGÐGØŸš¨°I¸yÐ3IÑ(IÑJÔJ�Að ˜1’f�fð �AŠvˆvØØ�a’�ÙØ�a’�Ø�å"ØØØØØØØØØð

ñ 

ô 

ˆ
ð ð 	#˜'ð 	#ð �HŠHØ%­Ô)9¸*Ñ)EÔ)EÀwÐ(OÑOñô ð ð �IŠI�j g¸*ˆIÑEÔEÐEÑEð
 �HŠHØ4ÝÔ# JÑ/Ô/°Ð9ñ:ñô ð õ % Z°WÐ=Ñ=Ô=ˆDØ×Ò˜TÑ"Ô"Ð"Ñ"àð Ø×"Ò" :Ñ.Ô.ð 	ð 	Ø!ð ð �Ø—	’	‘”��ðð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	ðð s   ÊKËKËKc                 óÈ  — d}t          j        | di ¦  «        5 }t          j        |||                              ¦   «         ||                              ¦   «         g||j                             ||¦  «        |¬¦  «         d d d ¦  «         n# 1 swxY w Y   t          j        ||         |¦  «        }	t          j        ||         |¦  «        }
|j                             ||	¦  «        }|j                             ||
¦  «        }t          ||j	        d||	d d ||
¬¦	  «	        }|  
                    dt          j        |¦  «        |fz  ¦  «         |                      ||d¬¦  «         dS )	Ns   hg-%h.patchr   )Ú
fntemplater   Fre   rf   rg   rd   )r   Únullformatterr   ÚexportÚrevÚvfsÚreljoinÚmakefilenamerR   r   rp   r   rq   rr   )r$   r-   Únode1Únode2r0   ÚmatcherrI   ÚtemplateÚfmÚlabel1r‡   Úfile1Úfile2s                r8   Ú	diffpatchrŸ   j  s�  € Ø€Hå	Ô	   Z°Ñ	4Ô	4ð 
¸ÝŒØØ�%Œ[�_Š_ÑÔ  U¤§¢Ñ 1Ô 1Ð2ØØ”x×'Ò'¨°Ñ:Ô:Øð	
ñ 	
ô 	
ð 	
ð
ð 
ð 
ñ 
ô 
ð 
ð 
ð 
ð 
ð 
ð 
øøøð 
ð 
ð 
ð 
õ Ô! $ u¤+¨xÑ8Ô8€FÝÔ! $ u¤+¨xÑ8Ô8€FØŒH×Ò˜W fÑ-Ô-€EØŒH×Ò˜W fÑ-Ô-€EÝØØŒ	àØØàØØØðñ ô €Gð ‡H‚HÐ"¥hÔ&6°wÑ&?Ô&?ÀÐ%IÑIÑJÔJÐJØ‡I‚Iˆg˜7¨z€IÑ:Ô:Ð:Øˆ1s   ™A%B
Â
BÂBc                 ó
  — |
                      d¦  «        }|                     |||¬¦  «        }t          |j        ¦  «        t          |j        ¦  «        t          |j        ¦  «        }}}|rU|                     |||¬¦  «        }t          |j        ¦  «        t          |j        ¦  «        t          |j        ¦  «        }}}n*t          ¦   «         t          ¦   «         t          ¦   «         }}}||z  |z  |z  }||z  |z  }|sdS ||z  ||z  |z
  z  }t          | |||                     ¦   «         ||¦  «        d         }|                     ¦   «         €dnd|                     ¦   «         z  }|rR||z  ||z  |z
  z  }t          | |||                     ¦   «         ||¦  «        d         }d|                     ¦   «         z  }nd }d}g }d}d}|                     ¦   «         �Dt          | |||                     ¦   «         ||¦  «        d         }d|                     ¦   «         z  }n4t          |¦  «        dk    rt          | ||d ||¦  «        \  }}n	d}|j
        }|} |}!|}"|
                      d¦  «        �set          |¦  «        dk    rðt          j        |                     ¦   «         ¦  «        }#t          j                             |||#¦  «        }|#|z   } t          j                             |¦  «        st$          j        }|rQt          j                             |||#¦  «        }|#|z   }!t          j                             |¦  «        st$          j        }t          j                             |||#¦  «        }|#|z   }"t)          ||j
        ||| ||!||"¬¦	  «	        }|                      d	t%          j        |¦  «        |fz  ¦  «         |                      ||d
¬¦  «         n“t1          ||j
        | |	||
                      d¦  «        ||t          j                             ||¦  «        |r t          j                             ||¦  «        nd t          j                             ||¦  «        |||¬¦  «         |D ]•\  }$}%}t          j        |$¦  «        }&|&t4          j                 |t4          j                 k    s&|&j        |j        k    s|&j        dz  |j        dz  k    r/|                      d|%|$fz  ¦  «         t          j        |$|%¦  «         Œ–dS )Nó   subrepos)r1   r   r   s   @%drd   ó   per_filere   rf   r   rg   ó   confirm)ru   rC   rv   rw   r0   rx   ry   rz   r{   r|   r}   é@   s6   file changed while diffing. Overwriting: %s (src: %s)
)ÚgetÚstatusÚsetÚmodifiedÚaddedÚremovedr9   r/   r“   r#   r   r   Ú	localpathÚpopr   r   r    rj   r   rk   rR   rp   rq   rr   rŽ   r,   ÚstatÚST_MTIMEÚst_sizeÚst_modeÚcopyfile)'r$   r-   Úctx1aÚctx1bÚctx2r™   r0   rI   rC   ru   Úoptsr   ÚstÚmod_aÚadd_aÚrem_aÚstbÚmod_bÚadd_bÚrem_bÚmodaddÚcommonÚdir1a_filesrx   r{   Údir1b_filesry   r|   r4   Údir2rootr}   rz   rƒ   r…   r‡   Úcommon_fileÚcopy_fnÚ
working_fnÚcpstats'                                          r8   ÚdiffrevsrÇ   ‹  sð  € ð �xŠx˜Ñ$Ô$€Hð 
�Š�d˜G°(ˆÑ	;Ô	;€BÝ˜bœkÑ*Ô*­C°´©M¬M½3¸r¼z¹?¼?�%ˆ5€EØð 2Ø�lŠl˜4 °xˆlÑ@Ô@ˆå�”ÑÔÝ�”	‰NŒNÝ�”ÑÔð ˆuˆˆõ "™eœe¥S¡U¤U­C©E¬E�eˆuˆØ�U‰]˜UÑ" UÑ*€FØ�e‰^˜eÑ#€FØð Øˆqð ˜%‘- E¨E¡M°UÑ#:Ñ;€KÝ�R˜˜{¨E¯JªJ©L¬L¸'À8ÑLÔLÈQÔO€EØ—9’9‘;”;Ð&ˆCˆC¨F°U·Y²Y±[´[Ñ,@€EØð 	à˜e‘m¨°©¸Ñ'>Ñ?ˆÝØ��k 5§:¢:¡<¤<°¸(ñ
ô 
à
ôˆð ˜Ÿš™œÑ$ˆˆàˆØˆà€Jð €HØ€DØ‡y‚y�{„{ÐÝ˜˜D &¨$¯)ª)©+¬+°wÀÑIÔIÈ!ÔLˆØ˜Ÿš™
œ
Ñ"ˆˆÝ	ˆV‰Œ�qŠˆõ
 $ B¨¨f°d¸GÀXÑNÔNÑˆˆjˆjð ˆØ”9ˆà€GØ€GØ€Fà�8Š8�KÑ Ô ñ 0
õ ˆv‰;Œ;˜!ÒÐÝœ.¨¯ª©¬Ñ6Ô6ˆKÝ”G—L’L ¨%°Ñ=Ô=ˆEØ! EÑ)ˆGÝ”7—>’> %Ñ(Ô(ð +Ý Ô*�Øð /ÝœŸš W¨e°[ÑAÔA�Ø%¨Ñ-�Ý”w—~’~ eÑ,Ô,ð /Ý$Ô.�EÝ”7—<’< ¨$°Ñ<Ô<ˆDØ  4Ñ'ˆFõ  ØØŒIØØØØØØØð

ñ 

ô 

ˆð 	�ŠÐ&­(Ô*:¸7Ñ*CÔ*CÀWÐ)MÑMÑNÔNÐNØ
�	Š	�'˜w°:ˆ	Ñ>Ô>Ð>Ð>õ 	ØØŒIØØØØ—H’H˜ZÑ(Ô(ØØÝ”'—,’,˜w¨Ñ.Ô.Ø28ÐB•"”'—,’,˜w¨Ñ.Ô.Ð.¸dÝ”—’˜h¨Ñ-Ô-ØØØð	
ñ 	
ô 	
ð 	
ð" $.ð /ð /Ñˆ�˜RÝ”˜'Ñ"Ô"ˆð •4”=Ô! R­¬Ô%6Ò6Ð6ØŒ~ ¤Ò+Ð+Ø” Ñ&¨B¬J¸Ñ,>Ò?Ð?à�HŠHð/Ø2<¸gÐ1FñGñô ð õ ŒM˜' :Ñ.Ô.Ð.øàˆ1r   Fc                 ó¸  — t          j        |dd¦  «         |                     d¦  «        }|                     d¦  «        }|                     d¦  «        }|                     d¦  «        }	d|v }
|	r?t          j        ||	d¦  «        }|                     ¦   «         |                     ¦   «         }}n›|s|rUt          j        ||g|gz   d¦  «        }t          j        ||d¦  «        }|t                   }t          j        ||d¦  «        }nBt          j
        ||¦  «        \  }}|s|d                              ¦   «         }n|t                   }|
r|                     ¦   «         t          k    rd}
t          j        |||¦  «        }|                     d	¦  «        r¡|                     d
¦  «        r!t          j        t          d¦  «        ¦  «        ‚|                     d¦  «        r!t          j        t          d¦  «        ¦  «        ‚|                     ¦   «         €!t          j        t          d¦  «        ¦  «        ‚t#          j        d¬¦  «        }	 |                     d	¦  «        rot'          | ||                     ¦   «         |                     ¦   «         |||¦  «        |                      t          d¦  «        ¦  «         t+          j        |¦  «         S t/          | ||||||||
||¦  «        |                      t          d¦  «        ¦  «         t+          j        |¦  «         S # |                      t          d¦  «        ¦  «         t+          j        |¦  «         w xY w)a
  Do the actual diff:

    - copy to a temp structure if diffing 2 internal revisions
    - copy to a temp structure if diffing working revision with
      another one and more than 1 file is changed
    - just invoke the diff for a single file in the working dir
    ó   revó   changeó   fromó   tos   $parent2Ns   nowarnFó   patchr¡   s&   --patch cannot be used with --subreposr¢   s&   --patch cannot be used with --per-files   --patch requires two revisionss   extdiff.)Úprefixs   cleaning up temp directory
)r   Úcheck_at_most_one_argr¥   r   Ú	revsingleÚp1Úp2r   Úunhidehashlikerevsr   Úrevpairr“   r   r	   ÚAbortr   r/   r   ÚmkdtemprŸ   r"   ÚshutilÚrmtreerÇ   )r$   r-   rI   Úpatsrµ   ru   ÚrevsÚfrom_revÚto_revÚchangerC   r´   r²   r³   r™   r0   s                   r8   ÚdodiffrÞ      s%  € õ Ô! $¨°	Ñ:Ô:Ð:Ø�8Š8�FÑÔ€DØ�xŠx˜Ñ Ô €HØ�XŠX�e‰_Œ_€FØ�XŠX�iÑ Ô €FØ˜GÐ#€Fàð "ÝÔ# D¨&°$Ñ7Ô7ˆØ—w’w‘y”y $§'¢'¡)¤)ˆuˆˆØ	ð "�Vð "ÝÔ)Ø�8�* ˜xÑ'¨ñ
ô 
ˆõ Ô$ T¨8°TÑ:Ô:ˆØ•W”ˆÝÔ# D¨&°$Ñ7Ô7ˆˆå Ô(¨¨tÑ4Ô4‰ˆˆtØð 	"Ø˜”J—M’M‘O”OˆEˆEà�”MˆEð ð Ø�9Š9‰;Œ;�'Ò!Ð!ØˆFåŒm˜D $¨Ñ-Ô-€Gà‡x‚x�ÑÔð DØ�8Š8�KÑ Ô ð 	LÝ”+�aÐ IÑJÔJÑKÔKÐKØ�8Š8�KÑ Ô ð 	LÝ”+�aÐ IÑJÔJÑKÔKÐKØ�9Š9‰;Œ;ÐÝ”+�aÐ AÑBÔBÑCÔCÐCåÔ kÐ2Ñ2Ô2€GðØ�8Š8�HÑÔð 	ÝØ�D˜%Ÿ*š*™,œ,¨¯	ª	©¬°W¸gÀwñô ð& 	�Š•Ð1Ñ2Ô2Ñ3Ô3Ð3ÝŒ�gÑÔÐÐõ! ØØØØØØØØØØØñ
ô 
ð 	�Š•Ð1Ñ2Ô2Ñ3Ô3Ð3ÝŒ�gÑÔÐÐøð 	�Š•Ð1Ñ2Ô2Ñ3Ô3Ð3ÝŒ�gÑÔÐÐøøøs   ÉAL! ËL! Ì!8Mó   oó   options!   pass option to comparison programs   OPTó   rrÉ   s   revision (DEPRECATED)s   REVrË   s   revision to diff froms   REV1rÌ   s   revision to diff tos   REV2ó   crÊ   s   change made by revisions   per-files/   compare each file instead of revision snapshotsr£   s3   prompt user before each external program invocationrÍ   s!   compare patches for two revisionsó   pó   programs   comparison program to runs   CMDs   hg extdiff [OPT]... [FILE]...©ÚhelpcategoryÚ	inferrepoc                 ó  — t          j        |¦  «        }|                     d¦  «        }|                     d¦  «        }|sd}|pdg}d                     t	          t
          j        |g|z   ¦  «        ¦  «        }t          | ||||¦  «        S )aP  use external program to diff repository (or selected files)

    Show differences between revisions for the specified files, using
    an external program. The default program used is diff, with
    default options "-Npru".

    To select a different program, use the -p/--program option. The
    program will be passed the names of two directories to compare,
    unless the --per-file option is specified (see below). To pass
    additional options to the program, use -o/--option. These will be
    passed before the names of the directories or files to compare.

    The --from, --to, and --change options work the same way they do for
    :hg:`diff`.

    The --per-file option runs the external program repeatedly on each
    file to diff, instead of once on two directories. By default,
    this happens one by one, where the next file diff is open in the
    external program only once the previous external program (for the
    previous file diff) has exited. If the external program has a
    graphical interface, it can open all the file diffs at once instead
    of one by one. See :hg:`help -e extdiff` for information about how
    to tell Mercurial that a given program has a graphical interface.

    The --confirm option will prompt the user before each invocation of
    the external program. It is ignored if --per-file isn't specified.
    rä   rà   s   diffs   -Npruó    )r   Úbyteskwargsr¥   r    Úmapr   r@   rÞ   )r$   r-   rÙ   rµ   ÚprogramÚoptionrI   s          r8   Úextdiffrî   Š  s‹   € õL Ô Ñ%Ô%€DØ�hŠh�zÑ"Ô"€GØ�XŠX�iÑ Ô €FØð &ØˆØÐ%˜H˜:ˆØ�iŠi��HÔ/°'°¸VÑ1CÑDÔDÑEÔE€GÝ�"�d˜G T¨4Ñ0Ô0Ð0r   c                   ó   — e Zd ZdZd„ Zd„ ZdS )ÚsavedcmdaÚ  use external program to diff repository (or selected files)

    Show differences between revisions for the specified files, using
    the following program::

        %(path)s

    When two revision arguments are given, then changes are shown
    between those revisions. If only one revision is specified then
    that revision is compared to the working directory, and, when no
    revisions are specified, the working directory files are compared
    to its parent.
    c                 óÞ   — t          j        |¦  «                             dd¦  «        }| xj        dt	          j        t          j        |¦  «        ¦  «        iz  c_        || _        || _        d S )Ns   \\ó   \r   )	r   Ú	escapestrrD   Ú__doc__r   ÚsysstrÚuireprÚ_cmdlineÚ_isgui)Úselfr   rI   ÚisguiÚdocpaths        r8   Ú__init__zsavedcmd.__init__É  s`   € õ Ô& tÑ,Ô,×4Ò4°W¸eÑDÔDˆØˆŒ˜¥¤µÔ1BÀ7Ñ1KÔ1KÑ!LÔ!LÐMÑMˆŒØˆŒØˆŒˆˆr   c                 óâ   — t          j        |¦  «        }d                     t          t          j        |d         ¦  «        ¦  «        }|rd|z   }t          ||| j        |z   ||| j        ¬¦  «        S )Nré   rà   )ru   )	r   rê   r    rë   r   r@   rÞ   r÷   rø   )rù   r$   r-   rÙ   rµ   Úoptionss         r8   Ú__call__zsavedcmd.__call__Ò  sr   € ÝÔ# DÑ)Ô)ˆØ—)’)�C¥Ô 3°T¸)´_ÑEÔEÑFÔFˆØð 	%Ø˜W‘nˆGÝØ��d”m gÑ-¨t°TÀ4Ä;ð
ñ 
ô 
ð 	
r   N)Ú__name__Ú
__module__Ú__qualname__rô   rü   rÿ   © r   r8   rð   rð   º  s<   € € € € € ðð ðð ð ð
ð 
ð 
ð 
ð 
r   rð   c                 ó  — t          j        |¦  «        }|                     d¦  «        rŠ|dd…         }|s-t          j        |¦  «        }|€t          j        | |¦  «        p|}|                      dd|z   ¦  «        }t          j        |¦  «        }|r|d|z   z  }|  	                    dd|z   ¦  «        }n†|r(|}t          t          j        |¦  «        ¦  «        dk    }nCt          j        |¦  «        }|€t          j        | |¦  «        p|}t          j        |¦  «        }d	}|  	                    dd|z   ¦  «        }|sI|d
z   }dD ]A}|                      ||¦  «        }|r'|d|z   z  }|€|  	                    ||dz   ¦  «        pd	} nŒB||||fS )a¥  
    returns following things for a
    ```
    [extdiff]
    <cmd> = <path>
    ```
    entry:

    cmd: command/tool name
    path: path to the tool
    cmdline: the command which should be run
    isgui: whether the tool uses GUI or not

    Reads all external tools related configs, whether it be extdiff section,
    diff-tools or merge-tools section, or its specified in an old format or
    the latest format.
    s   cmd.é   Nr   ó   opts.ré   ó   gui.rd   Fs	   .diffargs)r   s   merge-toolss   .gui)r   Ú
expandpathÚ
startswithr   Úfindexer
   ÚfindexternaltoolÚconfigr@   Ú
configboolr#   r   Ú
shlexsplit)	r$   r_   r   ÚdiffoptsrI   rú   rB   ÚsectionÚargss	            r8   Ú_gettooldetailsr  Ü  sË  € õ$ Œ?˜4Ñ Ô €DØ
‡~‚~�gÑÔð 9Ø�!�"�"ŒgˆØð 	BÝÔ# CÑ(Ô(ˆDØˆ|Ý Ô1°"°cÑ:Ô:ÐA¸c�Ø—9’9˜Z¨°C©Ñ8Ô8ˆÝÔ% dÑ+Ô+ˆØð 	'Ø�t˜h‘Ñ&ˆGØ—’˜j¨'°C©-Ñ8Ô8ˆˆàð 
	àˆGÝ�8Ô.¨wÑ7Ô7Ñ8Ô8¸1Ò<ˆHˆHõ Ô# CÑ(Ô(ˆDØˆ|Ý Ô1°"°cÑ:Ô:ÐA¸c�ÝÔ)¨$Ñ/Ô/ˆGØˆHØ—’˜j¨'°C©-Ñ8Ô8ˆàð Ø�LÑ ˆØ6ð 	ð 	ˆGØ—9’9˜W cÑ*Ô*ˆDØð Ø˜4 $™;Ñ&�Ø�=ØŸMšM¨'°3¸±=ÑAÔAÐJÀU�EØ�ð	ð
 ��g˜uÐ$Ð$r   c           	      ód  — |                       d¦  «        D ]™\  }}|                     d¦  «        s|                     d¦  «        rŒ0t          | ||¦  «        \  }}}} t          |t          d d …         t          d¦  «        |z  t          j        d¬¦  «        t          |||¦  «        ¦  «         Œšd S )Nr   r  r  s   hg %s [OPTION]... [FILE]...Trå   )Úconfigitemsr	  r  ÚcommandÚextdiffoptsr   ÚCATEGORY_FILE_CONTENTSrð   )r$   r_   r   rI   rú   s        r8   Úuisetupr    sÒ   € Ø—^’^ JÑ/Ô/ð 
*ð 
*‰	ˆˆTØ�>Š>˜(Ñ#Ô#ð 	 s§~¢~°gÑ'>Ô'>ð 	ØÝ$3°B¸¸TÑ$BÔ$BÑ!ˆˆT�7˜Eð	
�ØÝ˜˜˜ŒNÝÐ,Ñ-Ô-°Ñ3Ý Ô7Øð	
ñ 	
ô 	
õ �4˜ %Ñ
(Ô
(ñ	*ô 	*ð 	*ð 	*ð	
*ð 
*r   )NN)F)/rô   r   rF   r×   r­   rY   Úmercurial.i18nr   Úmercurial.noder   r   Ú	mercurialr   r   r   r	   r
   r   r   r   r   r   r   Úmercurial.utilsr   r   Úcmdtabler  ÚconfigtableÚ
configitemÚ
testedwithr9   rR   rb   rŽ   rŸ   rÇ   rÞ   ÚwalkoptsÚsubrepooptsr  r  rî   rð   r  r  Úi18nfunctionsr  r   r8   ú<module>r$     sn  ððJð JðZ 
€	€	€	Ø 	€	€	€	Ø €€€Ø €€€Ø Ð Ð Ð à Ð Ð Ð Ð Ð ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð
 €Ø
ˆ)Ô
˜HÑ
%Ô
%€à€Ø!ˆYÔ! +Ñ.Ô.€
à 
€
ØØØØð	ñ ô ð ð €
ØØØðñ ô ð ð €
ØØØØð	ñ ô ð ð €
ØØØðñ ô ð ð #€
ð,ð ,ð ,ð^')ð ')ð ')ðTð ð ð ðfð fð fðRð ð ðBRð Rð RðjGð Gð Gð GðZ ØØØˆAÐ2Ñ3Ô3ØˆAˆf‰IŒIð	
ð 
ˆv�r˜1˜1Ð5Ñ6Ô6¸¸¸&¹	¼	ÐBØ	ˆg�s˜A˜AÐ6Ñ7Ô7¸¸¸7¹¼ÐDØ	ˆe�S˜!˜!Ð2Ñ3Ô3°Q°Q°w±Z´ZÐ@Ø	ˆy˜#˜q˜qÐ!;Ñ<Ô<¸a¸aÀ¹i¼iÐHàØØØˆAÐ@ÑAÔAð		
ð ØØØˆAÐDÑEÔEð		
ð 
ˆh˜˜a˜aÐ DÑEÔEÐFð1ð4 Ôñ5ð6 Ôñ7ð ð@ 	€Øà	ˆz˜3  Ð">Ñ ?Ô ?ÀÀÀ6ÁÄÐKðð ñð €AÐ&Ñ'Ô'ØÔ/Øð	ñ 	ô 	ð#1ð #1ñ	ô 	ð#1ðL
ð 
ð 
ð 
ð 
ñ 
ô 
ð 
ðD5%ð 5%ð 5%ðp*ð *ð *ð �
€€€r   