korsygfhrtzangaiide
Elepffwdsff
/
lib64
/
python2.7
/
site-packages
/
hgext
/
Upload FileeE
HOME
� Hq�Qc @ sh d 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 d d l Z d d l Z d d l Z d d l Z d d l Z d Z d � Z d � Z d � Z i e d d d e d � e d � f d d g e d � e d � f d d g e d � e d � f d d d e d � e d � f g e j e d � f d 6Z d � Z e j d 7_ d S( s� 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. 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 vdiff, runs kdiff3 vdiff = kdiff3 # add new command called meld, runs meld (no need to name twice) 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 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). i����( t _( t shortt nullid( t scmutilR t utilt commandst encodingNt internalc C s t j j | j � } | d k r* d } n | d k rO d | t | � f } n t j j | | � } t j | � | d k r� | j t d � t | � t | � f � n | j t d � t | � � t j | � } g } | | } x| D]} t j | � } | | k rq� n | j d | � t j j | | � } | | } | j | | j � � } d | j � k r�| j | | � n8 | j | | � d | j � k r�t j | t t � n | d k r� | j | | j | � t j | � j f � q� q� W| | f S( s� 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.t t roots %s.%ss( making snapshot of %d files from rev %s s3 making snapshot of %d files from working directory s %s t lt xN( t ost patht basenameR t NoneR t joint mkdirt noteR t lenR t openerR t pconvertt wwritedatat datat flagst symlinkt writet setflagst Falset Truet appendt wjoint lstatt st_mtime( t uit repot filest nodet tmproott dirnamet baset wopenert fns_and_mtimet ctxt fnt wfnt destt fctxR ( ( s3 /usr/lib64/python2.7/site-packages/hgext/extdiff.pyt snapshotG s@ c + s? | j d � } | j d � } d j | � } d | k � | rc | rc t d � } t j | � � nr | r� t j | | d � j � } | j j | � \ } } n6 t j | | � \ } } | s� | j j � } n t } � r� | t k r� t � q� n t j | | | | � } t t | j | | | � d � \ } } } � rkt t | j | | | � d � \ } } } n t � t � t � } } } | | B| B| B} | | B| B} | s�d St j d d � } zS| | B| | B| B} t | | | | | � d } d | | j � } � r\| | B| | B| B} t | | | | | � d } d | | j � } n d } d } g } d } d } | r�t | | | | | � d } d | | j � } nB t | � d k r�t | | | d | � \ } } n d } | j } | }! | }"