~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/revisionspec.py

  • Committer: Marien Zwart
  • Date: 2007-03-09 04:27:06 UTC
  • mto: (2340.1.1 jam-integration)
  • mto: This revision was merged to the branch mainline in revision 2343.
  • Revision ID: marienz@gentoo.org-20070309042706-173aok1s5f30rcuj
Make the revid RevisionSpec also support utf8-encoded bytestrings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
379
379
    prefix = 'revid:'
380
380
 
381
381
    def _match_on(self, branch, revs):
382
 
        return RevisionInfo.from_revision_id(branch, self.spec.encode('utf-8'),
383
 
                                             revs)
 
382
        revision_id = self.spec
 
383
        if isinstance(revision_id, unicode):
 
384
            revision_id = revision_id.encode('utf-8')
 
385
        return RevisionInfo.from_revision_id(branch, revision_id, revs)
384
386
 
385
387
SPEC_TYPES.append(RevisionSpec_revid)
386
388