-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
æ^LOc @@ sß d Z d d l m 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 e e
ƒ d ƒ i d d 6d d 6d
d 6d d
6d d 6d d 6Z d „ Z d d „ Z d „ Z d „ Z d „ Z d „ Z d S( sC Utility functions for managing external merge tools such as kdiff3.i ( t absolute_importN( t lazy_imports=
from bzrlib import (
cmdline,
osutils,
trace,
)
s' bcompare {this} {other} {base} {result}t bcompares( kdiff3 {base} {this} {other} -o {result}t kdiff3s. xxdiff -m -O -M {result} {this} {base} {other}t xdiffs meld {base} {this_temp} {other}t melds8 opendiff {this} {other} -ancestor {base} -merge {result}t opendiffs winmergeu {result}t winmergeuc C@ sá t j | ƒ } | d } t j d k rµ t | ƒ } | d k rD t St j j | ƒ \ } } g t j
d d ƒ j t j ƒ D] } t | j
ƒ ƒ ^ q{ } t j j | ƒ o´ | | k St j | t j ƒ pÜ t j | ƒ d k Sd S( Ni t win32t PATHEXTt ( t cmdlinet splitt syst platformt _get_executable_patht Nonet Falset ost patht splitextt getenvt pathsept unicodet lowert existst accesst X_OKt osutilst find_executable_on_path( t command_linet cmd_listt exet baset extt st path_ext( ( s5 /usr/lib/python2.7/dist-packages/bzrlib/mergetools.pyt check_availability/ s
:c @ sŒ | d k r t } n t j | ƒ } t | d ƒ } | d k rM | | d <n t | ˆ ƒ \ } ‰ ‡ ‡ f d † } | | d | d | ƒ S( sé Invokes the given merge tool command line, substituting the given
filename according to the embedded substitution markers. Optionally, it
will use the given invoker function instead of the default
subprocess_invoker.
i c @ s? ˆ d k r; | d k r+ t j ˆ ˆ ƒ q; t j ˆ ƒ n d S( Ni ( R t shutilt moveR t remove( t retcode( t filenamet tmp_file( s5 /usr/lib/python2.7/dist-packages/bzrlib/mergetools.pyt cleanupL s i N( R t subprocess_invokerR R R t _subst_filename( R R* t invokerR R t argsR, ( ( R* R+ s5 /usr/lib/python2.7/dist-packages/bzrlib/mergetools.pyt invoke? s
c C@ s# t j j | ƒ r | St j | ƒ S( N( R R t isabsR R ( R ( ( s5 /usr/lib/python2.7/dist-packages/bzrlib/mergetools.pyR U s c C@ sï i | d d 6| d d 6| d d 6| d 6} d } g } x¨ | D] } d | k rÅ d | k rÅ t j d
t j j | ƒ ƒ \ } } t j d | | ƒ t j | ƒ t j
| d | ƒ | | d <n t | | ƒ } | j | ƒ qA W| | f S( Nu .BASER! u .THISt thisu .OTHERt othert results {this_temp}t this_tempu _bzr_mergetools_%s.THISs fh=%r, tmp_file=%r(
R t tempfilet mkstempR R t basenamet tracet muttert closeR&