/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2008-04-24 07:22:53 UTC
  • mto: This revision was merged to the branch mainline in revision 3415.
  • Revision ID: mbp@sourcefrog.net-20080424072253-opmjij7xfy38w27f
Remove every assert statement from bzrlib!

Depending on the context they are:

 * turned into an explicit if/raise of either AssertionError 
   or something more specific -- particularly where they protect
   programming interfaces, complex invariants, or data file integrity
 * removed, if they're redundant with a later check, not protecting
   a meaningful invariant
 * turned into a selftest method on tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
1298
1298
            last_revision = wt.last_revision()
1299
1299
 
1300
1300
        revision_ids = b.repository.get_ancestry(last_revision)
1301
 
        assert revision_ids[0] is None
1302
1301
        revision_ids.pop(0)
1303
1302
        for revision_id in revision_ids:
1304
1303
            self.outf.write(revision_id + '\n')
1723
1722
            message=None,
1724
1723
            limit=None):
1725
1724
        from bzrlib.log import show_log
1726
 
        assert message is None or isinstance(message, basestring), \
1727
 
            "invalid message argument %r" % message
1728
1725
        direction = (forward and 'forward') or 'reverse'
1729
1726
        
1730
1727
        # log everything
2972
2969
                                possible_transports, pb):
2973
2970
        """Produce a merger from a location, assuming it refers to a branch."""
2974
2971
        from bzrlib.tag import _merge_tags_if_possible
2975
 
        assert revision is None or len(revision) < 3
2976
2972
        # find the branch locations
2977
2973
        other_loc, user_location = self._select_branch_location(tree, location,
2978
2974
            revision, -1)