~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-06-18 21:07:10 UTC
  • mfrom: (2490.2.27 graphwalker)
  • Revision ID: pqm@pqm.ubuntu.com-20070618210710-6y8wzcqiw2kvxdiy
Better merge base selection and graph API

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