~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-12 17:01:44 UTC
  • mfrom: (2340.1.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070312170144-be4e29ded595dd0a
(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