~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revision.py

- remove dead validate_revision_id function and tests
  revision ids are now only constrained by convention

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
    def __ne__(self, other):
58
58
        return not self.__eq__(other)
59
59
 
60
 
        
61
 
REVISION_ID_RE = None
62
 
 
63
 
def validate_revision_id(rid):
64
 
    """Check rid is syntactically valid for a revision id."""
65
 
    global REVISION_ID_RE
66
 
    if not REVISION_ID_RE:
67
 
        import re
68
 
        REVISION_ID_RE = re.compile('[\w:.-]+@[\w%.-]+--?[\w]+--?[0-9a-f]+\Z')
69
 
 
70
 
    if not REVISION_ID_RE.match(rid):
71
 
        raise ValueError("malformed revision-id %r" % rid)
72
 
 
73
60
 
74
61
def is_ancestor(revision_id, candidate_id, branch):
75
62
    """Return true if candidate_id is an ancestor of revision_id.