-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
Ì\,Tc @ sv 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
m Z d d l Z d d l
Z
d d l Z d d l Z d d l Z i Z e j e ƒ Z d Z d „ Z d „ Z e d 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 ƒ d e ƒd „ ƒ Z d „ Z 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 cmdutilt 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 ( ( s1 /usr/lib/python2.7/dist-packages/hgext/extdiff.pyt snapshotI s@
c + sD | 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 ƒ } zX| | 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 } | }! | }"