Example #1
0
        private void _queueOrVisit(QueryProcessor qp,
                                   Changeset cs, int distance, string branch)
        {
            Revision rev = _results.getRevision(cs.ChangesetId);

            if (rev == null)
            {
                /* ok, ok, we really don't have it...
                 * didn't find it, so do the first level query.
                 */
                if (!_handleVisit(qp, cs, distance))
                {
                    /* manufacture a visit since this changeset
                     * has no merge actions to get branches from
                     */
                    if (branch == null)
                    {
                        /* determine a branch from the changesets's changes
                         * we're not queuing it, so we look for _all_ branches.
                         * (eg, 2nd level :[ )
                         */
                        List <string> branches =
                            tfsinterface.Utils.FindChangesetBranches(cs, (cng) => true);

                        foreach (string b in branches)
                        {
                            _results.construct(b, cs);
                        }
                    }
                    else
                    {
                        Logger.logger.DebugFormat("building {0}", cs.ChangesetId);
                        _results.construct(branch, cs);
                    }
                }
            }
            else
            {
                /* woo, got nothing left to do! */
            }
        }