~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Vincent Ladeuil
  • Date: 2007-06-20 14:25:06 UTC
  • mfrom: (2540 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2646.
  • Revision ID: v.ladeuil+lp@free.fr-20070620142506-txsb1v8538kpsafw
merge bzr.dev @ 2540

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
 
21
21
import bzrlib.errors as errors
22
 
from bzrlib.graph import node_distances, select_farthest, all_descendants, Graph
 
22
from bzrlib.deprecated_graph import (
 
23
    all_descendants,
 
24
    Graph,
 
25
    node_distances,
 
26
    select_farthest,
 
27
    )
23
28
from bzrlib.osutils import contains_whitespace
24
29
from bzrlib.progress import DummyProgress
25
30
from bzrlib.symbol_versioning import (deprecated_function,
476
481
    """Raise ReservedId if the supplied revision_id is reserved"""
477
482
    if is_reserved_id(revision_id):
478
483
        raise errors.ReservedId(revision_id)
 
484
 
 
485
def ensure_null(revision_id):
 
486
    """Ensure only NULL_REVISION is used to represent the null revisionn"""
 
487
    if revision_id is None:
 
488
        return NULL_REVISION
 
489
    else:
 
490
        return revision_id