~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Marien Zwart
  • Date: 2007-03-11 18:14:44 UTC
  • mto: (2340.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2343.
  • Revision ID: marienz@gentoo.org-20070311181444-9p0nwvaljp1h42xh
Call osutils.safe_revision_id instead of duplicating it.

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
 
        revision_id = self.spec
383
 
        if isinstance(revision_id, unicode):
384
 
            revision_id = revision_id.encode('utf-8')
 
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)
385
387
        return RevisionInfo.from_revision_id(branch, revision_id, revs)
386
388
 
387
389
SPEC_TYPES.append(RevisionSpec_revid)