~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-23 22:58:34 UTC
  • mto: This revision was merged to the branch mainline in revision 1979.
  • Revision ID: john@arbash-meinel.com-20060823225834-d688aa3c26b927e2
Check that invalid specs are properly handled

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    errors,
24
24
    revision,
25
25
    )
26
 
from bzrlib.errors import BzrError, NoSuchRevision, NoCommits
 
26
from bzrlib.errors import NoSuchRevision, NoCommits
27
27
 
28
28
 
29
29
_marker = []
132
132
                if spec.startswith(spectype.prefix):
133
133
                    return object.__new__(spectype, spec)
134
134
            else:
135
 
                raise BzrError('No namespace registered for string: %r' %
136
 
                               spec)
 
135
                raise errors.NoSuchRevisionSpec(spec)
137
136
        else:
138
137
            raise TypeError('Unhandled revision type %s' % spec)
139
138