~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

  • Committer: John Arbash Meinel
  • Date: 2007-01-24 20:40:20 UTC
  • mfrom: (2242 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2245.
  • Revision ID: john@arbash-meinel.com-20070124204020-szyxbjpn9mzbsks7
[merge] bzr.dev 2242

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)