³ņ ÷$•Jc@sDdZddklZdZd„Zd„Zd„Zd„ZdS( s>supports walking the history as DAGs suitable for graphical output The most basic format we use is that of:: (id, type, data, [parentids]) The node and parent ids are arbitrary integers which identify a node in the context of the graph returned. Type is a constant specifying the node type. Data depends on type. i’’’’(tnullrevtCccsŽ|}x||jos||}g}|iƒD]*}|iƒtjo||iƒq1q1~}|t|t|ƒfV|d8}q WdS(stcset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples This generator function walks through the revision history from revision start to revision stop (which must be less than or equal to start). It returns a tuple for each node. The node and parent ids are arbitrary integers which identify a node in the context of the graph returned. iN(tparentstrevRt CHANGESETtsorted(trepotstarttstoptcurtctxt_[1]tpR((s%/sys/lib/python/mercurial/graphmod.pyt revisionss  Dc csŪt|i|ƒƒd}x»|djo­|i|d|ƒ}g}|iƒD]*}|iƒ|jo||iƒqOqO~}|iƒ} | |jo| t|t|ƒfVn| |joPn|d8}qWdS(sĪfile cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples This generator function walks through the revision history of a single file from revision start down to revision stop. iitfileidN( tlentfiletfilectxRtpathtlinkrevRRR( RRRRtfilerevtfctxR tfRR((s%/sys/lib/python/mercurial/graphmod.pytfilerevs'sD   ccsŒt|ƒ}xy|D]q}||}g}|iƒD]*}|iƒ|jo||iƒq4q4~}|iƒt|t|ƒfVqWdS(s±cset DAG generator yielding (id, CHANGESET, ctx, [parentids]) tuples This generator function walks the given nodes. It only returns parents that are in nodes, too. N(tsetRtnodeRRR(RtnodestincludeRR R R R((s%/sys/lib/python/mercurial/graphmod.pyR8s   Dc csĻg}h}d}x¶|D]®\}}}}||jo%|i|ƒ|||<|d7}n|i|ƒ}|i|ƒ} |} g} |D]} | | jo | | qq~ } | | ||d+xCt| ƒD]5\}} |p| ||    2    ' /N(t__doc__tmercurial.nodeRRR RRR.(((s%/sys/lib/python/mercurial/graphmod.pyss