~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: John Arbash Meinel
  • Date: 2007-03-12 16:29:47 UTC
  • mfrom: (2325.2.5 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 2343.
  • Revision ID: john@arbash-meinel.com-20070312162947-y3a3fjf0iwalwot5
(Marien Zwart) RevisionSpec.from_string() should support Unicode parameters. (especially for revid:)

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib import (
23
23
    errors,
 
24
    osutils,
24
25
    revision,
25
26
    symbol_versioning,
26
27
    trace,
379
380
    prefix = 'revid:'
380
381
 
381
382
    def _match_on(self, branch, revs):
382
 
        return RevisionInfo.from_revision_id(branch, self.spec, revs)
 
383
        # self.spec comes straight from parsing the command line arguments,
 
384
        # so we expect it to be a Unicode string. Switch it to the internal
 
385
        # representation.
 
386
        revision_id = osutils.safe_revision_id(self.spec, warn=False)
 
387
        return RevisionInfo.from_revision_id(branch, revision_id, revs)
383
388
 
384
389
SPEC_TYPES.append(RevisionSpec_revid)
385
390