~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.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:
228
228
        for parent in parents:
229
229
            descendants[parent][node] = 1
230
230
        ancestors[node] = set(parents)
231
 
 
232
 
    assert root not in descendants[root]
233
 
    assert root not in ancestors[root]
234
231
    return root, ancestors, descendants
235
232
 
236
233
 
327
324
    @symbol_versioning.deprecated_method(symbol_versioning.one_three)
328
325
    def __init__(self, *args):
329
326
        object.__init__(self)
330
 
        assert len(args) != 0
331
327
        self._revision_sources = args
332
328
 
333
329
    def revision_parents(self, revision_id):