\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZmZddlZddlmZddlmZmZddl m Z e j Z dZ dZ d efd YZd e jfd YZdS( i(tabsolute_importtprint_functionN(t_(terrortpycompati(tcommoncc@sZt|}x<|dkrJ|| ||dfV|jdd|}qWd|fVdS(sYield tuples with path split at '/', starting with the full path. No leading, trailing or double '/', please. >>> for x in rpairs(b'foo/bar/baz'): print(x) ('foo/bar/baz', '') ('foo/bar', 'baz') ('foo', 'bar/baz') ('.', 'foo/bar/baz') iit/it.N(tlentrfind(tpathti((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytrpairss cC@s|dkrdStj|S(s We use posixpath.normpath to support cross-platform path format. However, it doesn't handle None input. So we wrap it up. N(tNonet posixpathtnormpath(R ((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt normalize"s t filemappercB@sGeZdZddZdZdZdZdZdZ RS(sMap and filter filenames when importing. A name can be mapped to itself, a new name, or None (omit from new repository).cC@sa||_i|_i|_i|_d|_|r]|j|r]tjt dq]ndS(Nserrors in filemap( tuitincludetexcludetrenameR ttargetprefixestparseRtAbortR(tselfRR ((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt__init__.s     c@sd}fd}tjd|ddj}x|r|dkrtj}|||jd7}|j|?RRRtsources%s:%d: unknown directive %r i(Rtshlexert get_tokenRRRRRRRRRRRR (RR terrsR%tcmdR!tsrctdest((R$Rs;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR8s6       "  cC@s_t|}xCt|D]5\}}y||||fSWqtk rMqXqWd|dfS(Nt(RR tKeyError(RR!R"tpretsuf((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytlookupfs  cC@s|jdkrNt|_x0|jjD]\}}|jj|q+Wn|j sgd|jkrktSt|}x-t|D]\}}||jkrtSqWt S(sReturn true if the given target filename is covered as a destination of the filemap. This is useful for identifying what parts of the target repo belong to the source repo and what parts don't.RN( RR tsetRt iteritemstaddtTrueRR tFalse(RtfilenametbeforetafterR1R2((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt istargetfileos  cC@s|jr%|j||jd}n|}|jrP|j||jd}nd}|j rf|s~t|t|krdS|j||j\}}}|r|dkr|S|r|jdr||S|d|S|S|S(NiR/RR(RR3RRR RR(RR!tinctexctnewpreR1R2((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyt__call__s$  (  cC@st|jp|jp|jS(N(tboolRRR(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pytactivesN( t__name__t __module__t__doc__R RRR3R<R@RB(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR)s .  tfilemap_sourcecB@seZdZdZdZdZdZdZdZdZ dZ d Z d Z d Z d Zd ZdZdZdZdZdZdZRS(cC@stt|j||j||_t|||_i|_i|_i|_d|_ t |_ i|_ i|_i|_|jjdd|_dS(Ntconverttignoreancestorcheck(tsuperRFRtrepotypetbaseRtcommitst parentmaptwantedancestorsR tconvertedorderR8t_rebuiltt origparentstchildrent seenchildrenRt configboolRH(RRt baseconvertertfilemap((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRs          cC@s|jjdS(N(RKR:(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR:scC@s|jjdS(N(RKR;(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR;sc C@s| |_itt6}t}g}x|jD]}||}||k}|rl|||<||j|tsics@s|]}|dVqdS(iN((RzRo((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pys sitclosei(RLReRRHRlR4tbranchR8t enumerateRMRWtanyRpR7RYR6R tmaxRQtextraRaRjRORkRiRKt getchangesRtdiscardtsortedtitems(RR_tfullRetmparentst knownparentsRthasbranchparentR t isancestorRotwptclosedt pbranchestchangestcopiestcleanp2Rvtncleanp2RwRstnewftncopiesRntnewct newsource((R|R}Rs;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRVs|    "  &   %  ,       cC@s|jj|S(N(RR<(Rttargetfilename((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyttargetfilebelongstosourcescC@s|\}}|jj||S(N(RKtgetfile(RR!R_trealnametrealrev((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRs cC@s |jjS(N(RKtgettags(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRscC@s |jjS(N(RKthasnativeorder(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRscC@s|jj|S(N(RKt lookuprev(RR_((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRscC@s |jjS(N(RKt getbookmarks(R((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRscC@s|jj||dS(N(RKR^(RR_tsinkrev((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyR^s(RCRDRR:R;RZRlRmRdRpRkRaRjRiRRRRRRRR^(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyRFs(            g      (t __future__RRRtmercurial.i18nRt mercurialRRR/RRWR RtobjectRtconverter_sourceRF(((s;/usr/lib64/python2.7/site-packages/hgext/convert/filemap.pyts