/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/plugins/git/mapping.py

  • Committer: Jelmer Vernooij
  • Date: 2018-06-21 23:59:28 UTC
  • mfrom: (6973.6.4 python3-e)
  • Revision ID: jelmer@jelmer.uk-20180621235928-f7z0vf0lxc6ieo9e
Merge lp:~jelmer/brz/python3-e

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
from ...revision import (
41
41
    NULL_REVISION,
42
42
    )
 
43
from ...sixish import text_type
43
44
from .errors import (
44
45
    NoPushSupport,
45
46
    UnknownCommitExtra,
159
160
        # We must just hope they are valid UTF-8..
160
161
        if path == "":
161
162
            return ROOT_ID
162
 
        if type(path) is unicode:
 
163
        if isinstance(path, text_type):
163
164
            path = path.encode("utf-8")
164
165
        return FILE_ID_PREFIX + escape_file_id(path)
165
166
 
553
554
def symlink_to_blob(symlink_target):
554
555
    from dulwich.objects import Blob
555
556
    blob = Blob()
556
 
    if type(symlink_target) == unicode:
 
557
    if isinstance(symlink_target, text_type):
557
558
        symlink_target = symlink_target.encode('utf-8')
558
559
    blob.data = symlink_target
559
560
    return blob