~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/graph.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-08 07:05:00 UTC
  • mfrom: (3376.2.15 no-asserts)
  • Revision ID: pqm@pqm.ubuntu.com-20080508070500-9zyyvsk0eev20t4w
(mbp) remove and disallow assert statements

Show diffs side-by-side

added added

removed removed

Lines of Context:
474
474
            if len(unique_search_sets) == 1:
475
475
                nodes = unique_search_sets.pop()
476
476
                uncommon_nodes = nodes.difference(common_ancestors)
477
 
                assert not uncommon_nodes, ("Somehow we ended up converging"
478
 
                                            " without actually marking them as"
479
 
                                            " in common."
480
 
                                            "\nStart_nodes: %s"
481
 
                                            "\nuncommon_nodes: %s"
482
 
                                            % (revisions, uncommon_nodes))
 
477
                if uncommon_nodes:
 
478
                    raise AssertionError("Somehow we ended up converging"
 
479
                                         " without actually marking them as"
 
480
                                         " in common."
 
481
                                         "\nStart_nodes: %s"
 
482
                                         "\nuncommon_nodes: %s"
 
483
                                         % (revisions, uncommon_nodes))
483
484
                break
484
485
        return border_ancestors, common_ancestors, searchers
485
486
 
679
680
 
680
681
        # TODO: We need a way to remove unique_searchers when they overlap with
681
682
        #       other unique searchers.
682
 
        assert len(searchers) == 2, (
683
 
            "Algorithm not yet implemented for > 2 searchers")
 
683
        if len(searchers) != 2:
 
684
            raise NotImplementedError(
 
685
                "Algorithm not yet implemented for > 2 searchers")
684
686
        common_searchers = searchers
685
687
        left_searcher = searchers[0]
686
688
        right_searcher = searchers[1]