/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/git/mapping.py

  • Committer: Jelmer Vernooij
  • Date: 2019-06-16 02:23:42 UTC
  • mfrom: (7340 work)
  • mto: This revision was merged to the branch mainline in revision 7350.
  • Revision ID: jelmer@jelmer.uk-20190616022342-ihxzayq04x5culzd
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
            encoding = commit.encoding.decode('ascii')
384
384
        else:
385
385
            encoding = 'utf-8'
386
 
        message, metadata = self._decode_commit_message(
387
 
            None, commit.message, encoding)
388
 
        if metadata.revision_id:
389
 
            return metadata.revision_id
 
386
        try:
 
387
            message, metadata = self._decode_commit_message(
 
388
                None, commit.message, encoding)
 
389
        except UnicodeDecodeError:
 
390
            pass
 
391
        else:
 
392
            if metadata.revision_id:
 
393
                return metadata.revision_id
390
394
        return self.revision_id_foreign_to_bzr(commit.id)
391
395
 
392
396
    def import_commit(self, commit, lookup_parent_revid):