~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: Aaron Bentley
  • Date: 2007-02-07 03:09:58 UTC
  • mfrom: (2268 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2269.
  • Revision ID: aaron.bentley@utoronto.ca-20070207030958-fx6ykp7rg7zma6xu
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
454
454
        next = best_ancestor(next)
455
455
    path.reverse()
456
456
    return path
 
457
 
 
458
 
 
459
def is_reserved_id(revision_id):
 
460
    """Determine whether a revision id is reserved
 
461
 
 
462
    :return: True if the revision is is reserved, False otherwise
 
463
    """
 
464
    return isinstance(revision_id, basestring) and revision_id.endswith(':')
 
465
 
 
466
 
 
467
def check_not_reserved_id(revision_id):
 
468
    """Raise ReservedId if the supplied revision_id is reserved"""
 
469
    if is_reserved_id(revision_id):
 
470
        raise errors.ReservedId(revision_id)