~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: 2006-09-25 18:42:17 UTC
  • mfrom: (2039.1.2 progress-cleanup)
  • Revision ID: pqm@pqm.ubuntu.com-20060925184217-fd144de117df49c3
cleanup progress properly when interrupted during fetch (#54000)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
27
27
        )
28
28
 
29
29
NULL_REVISION="null:"
30
 
CURRENT_REVISION="current:"
31
30
 
32
31
 
33
32
class Revision(object):
454
453
        next = best_ancestor(next)
455
454
    path.reverse()
456
455
    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)