\x89\x50\x4E\x47\x0D\x0A\x1A\x0A PNG  \x89\x50\x4E\x47\x0D\x0A\x1A\x0A  13\c@@sddlmZddlZddlmZddlmZmZejdZ dZ dZ d e fd YZ d Zd e fd YZde fdYZdS(i(tabsolute_importNi(tnullrev(tpolicytpycompattparserscG@sIt|tst|}nt|kr1tSt|dkrG|Sdt|>d}dgt|d}x(t|D]\}}d|>||}t}t|}t|d} xr| dkrD|rD| } | d8} || sqn|| } | |kra|d8}| |kra|j| | |O} | |kr^| hSqan| |krx|| D]d} || } | tkrqzn| dkr| || <|d7}qz| | krz|| c| Ofd}t|}t|dkr4|S||S(s Returns the common ancestors of a and b that are furthest from a root (as measured by longest path). pfunc must return a list of parent vertices for a given vertex. c@si}t|d}dg|}dg|}g}x[tt|D]G\}}d||}|||| D]0} | tkrqn|| }|| }}|| kr| d|| <|| kr2|| cd7<| }|| <|r||cd8<||dkr||=qqq2q| |dkr|| B}||krqn||| <|j|d||cd7<||cd8<||dkr2||=q2qqW|| cd8<|| dkr|| =qqWt|dkrzgSdx|D]}|OqWtfd|DS(Niic3@s%|]\}}|@r|VqdS(N((t.0RR(tk(s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pys s(RR tsortedtappendRRt setdefaultR(R RtcounttdepthRtmappingRRtbRRtdvRRtdptnspR(R (Rs8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pytdeepestSsh       !            i(RR(R t orignodesR&R((R s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pyt ancestorsLs 8tincrementalmissingancestorscB@s;eZdZdZdZdZdZdZRS(spersistent state used to calculate missing ancestors incrementally Although similar in spirit to lazyancestors below, this is a separate class because trying to support contains and missingancestors operations with the same internal data structures adds needless complexity.cC@s8t||_|js+|jjtn||_dS(N(RtbasesR RR (tselfR R*((s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pyt__init__s cC@s|jo|jthkS(s0whether the common set has any non-trivial bases(R*R(R+((s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pythasbasesscC@s|jj|dS(s)grow the ancestor set by adding new basesN(R*tupdate(R+tnewbases((s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pytaddbasessc@s|j}|j}|j||jt|s6dSt|tfd|D}t||krtdSxotj t |ddD]N}||krqn|j||j ||t||krPqqWdS(s:remove all ancestors of bases from the set revs (in place)Nc3@s!|]}|krdVqdS(iN((Rtr(tstart(s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pys sii( R*R tdifference_updatetdiscardRRtsumRRtxrangetminR.(R+trevsR*R t keepcounttcurr((R2s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pytremoveancestorsfroms"     &  c C@st|}|j}|j}|j|}|j||sDgStt|t|}g}xLtj|tdD]5}|sPn||kr|j |x;||D]-} |j | |j | |j | qWq{n||kr|j ||j ||} |} n||kr{|} |} nq{xr||D]d} | tkr]qH| | ksu| |kr|j | |j | |j | qH| j | qHWq{W|j |S(sreturn all the ancestors of revs that are not ancestors of self.bases This may include elements from revs. Equivalent to the revset (::revs - ::self.bases). Revs are returned in revision number order, which is a topological order.i(RR*R t intersectionR3RRR6RtremoveR4R Rtreverse( R+R8t revsvisitt basesvisitR t bothvisitR2tmissingR:Rt thisvisitt othervisit((s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pytmissingancestorssL                  (t__name__t __module__t__doc__R,R-R0R;RE(((s8/usr/lib64/python2.7/site-packages/mercurial/ancestor.pyR)s     cc@sth}tj}tj}tj}|j}|rjg|D] } | ^q:} |j|tj| ng} tj| xn|D]f} || \} } | |kr|| | || n| |kr|| | || qqWx| r| d } | |krPn| V|| \} } | |krn| | dkrS| | ds  8 Ey +M