-=[ Mr. Bumblebee ]=-
_Indonesia_
ó
Ì\,Tc @ s• d d l m Z d d l m Z d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d „ ƒ YZ d e f d
„ ƒ YZ d e e f d „ ƒ YZ d
S( iÿÿÿÿ( t nullrev( t _t basedagc B sƒ e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d
d „ Z d
d „ Z
d „ Z d „ Z d
„ Z
d „ Z e d „ Z RS( sð generic interface for DAGs
terms:
"ix" (short for index) identifies a nodes internally,
"id" identifies one externally.
All params are ixs unless explicitly suffixed otherwise.
Pluralized params are lists or sets.
c C s
d | _ d S( N( t Nonet _inverse( t self( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt __init__ s c C s
t ‚ d S( s set of all node idxsN( t NotImplementedError( R ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt nodeset s c C s
t ‚ d S( s list of head ixsN( R ( R ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt heads s c C s
t ‚ d S( s list of parents ixs of ixN( R ( R t ix( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt parents# s c C s
t ‚ d S( s1 inverse DAG, where parents becomes children, etc.N( R ( R ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt inverse' s c C s
t ‚ d S( sV
set of all ancestors of starts (incl), but stop walk at stops (excl)
N( R ( R t startst stops( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt ancestorset+ s c C s | j ƒ j | | ƒ S( sX
set of all descendants of starts (incl), but stop walk at stops (excl)
( R R ( R R
R ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt
descendantset1 s c C s
t ‚ d S( sé
subset of connected list of ixs so that no node has a descendant in it
By "connected list" we mean that if an ancestor and a descendant are in
the list, then so is at least one path connecting them.
N( R ( R t ixs( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt headsetofconnecteds7 s c C s
| j | ƒ S( s4 return a list of (or set if given a set) of node ids( t _externalize( R R
( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt externalize@ s c C s2 | j | ƒ } t | t ƒ r( t | ƒ St | ƒ S( s4 return a list of (or set if given a set) of node ids( t _externalizeallt
isinstancet sett list( R R t ids( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt externalizeallD s
c C s
| j | ƒ S( s4 return a list of (or set if given a set) of node ixs( t _internalize( R t id( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt internalizeK s c C s5 | j | | ƒ } t | t ƒ r+ t | ƒ St | ƒ S( s4 return a list of (or set if given a set) of node ids( t _internalizeallR R R ( R R t
filterunknownR ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyt internalizeallO s
N( t __name__t
__module__t __doc__R R R R R R R R R R R R t FalseR ( ( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR
s t
genericdagc B s# e Z d Z d d „ Z d „ Z RS( s generic implementations for DAGsc C s‹ | r t | ƒ p t ƒ } t ƒ } t | ƒ } xT | r† | j ƒ } | | k r3 | | k r3 | j | ƒ | j | j | ƒ ƒ q3 q3 W| S( N( R R t popt addt extendR ( R R
R t seent pendingt n( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR Z s
c C s^ t | ƒ } | s | Sx5 | D]- } x$ | j | ƒ D] } | j | ƒ q3 Wq W| sZ t ‚ | S( N( R R t discardt AssertionError( R R t hdsR+ t p( ( s5 /usr/lib/python2.7/dist-packages/mercurial/dagutil.pyR e s
N( R! R"