Exemplo n.º 1
0
        private IEnumerable <Revision> _primaryRevs(int csID)
        {
            Queue <Revision> revs = new Queue <Revision>();
            Revision         rev  = this.getRevision(csID) as Revision;

            while (rev != null)
            {
                yield return(rev);

                /* now walk through the parents of each revision in this branch
                 * and dump them all.
                 */
                foreach (Revision pr in rev.getParents())
                {
                    if (rev.Branch == pr.Branch)
                    {
                        revs.Enqueue(pr);
                    }
                }

                if (revs.Count > 0)
                {
                    rev = revs.Dequeue();
                }
                else
                {
                    rev = null;
                }
            }
        }
Exemplo n.º 2
0
        private System.Collections.IEnumerable _childrenGetter(object model)
        {
            Revision rev = model as Revision;

            return(rev.getParents());
        }