~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Aaron Bentley
  • Date: 2007-08-15 00:37:00 UTC
  • mto: This revision was merged to the branch mainline in revision 2733.
  • Revision ID: aaron.bentley@utoronto.ca-20070815003700-qjjnrv4ba7gwxket
Replace exception with deprecation warning

Show diffs side-by-side

added added

removed removed

Lines of Context:
492
492
def ensure_null(revision_id):
493
493
    """Ensure only NULL_REVISION is used to represent the null revisionn"""
494
494
    if revision_id is None:
495
 
        raise 'hell'
 
495
        symbol_versioning.warn('NULL_REVISION should be used for the null'
 
496
            ' revision instead of None, as of bzr 0.91.',
 
497
            DeprecationWarning, stacklevel=2)
496
498
        return NULL_REVISION
497
499
    else:
498
500
        return revision_id