/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/fetch.py

  • Committer: Jelmer Vernooij
  • Date: 2018-07-03 00:15:59 UTC
  • mto: This revision was merged to the branch mainline in revision 7027.
  • Revision ID: jelmer@jelmer.uk-20180703001559-crogxh6en8s4d83b
Fix remaining git tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
    """
257
257
    (base_hexsha, hexsha) = hexshas
258
258
    (base_mode, mode) = modes
259
 
    if type(path) is not str:
 
259
    if not isinstance(path, bytes):
260
260
        raise TypeError(path)
261
 
    if type(name) is not str:
 
261
    if not isinstance(name, bytes):
262
262
        raise TypeError(name)
263
263
    if base_hexsha == hexsha and base_mode == mode:
264
264
        # If nothing has changed since the base revision, we're done
406
406
    store_updater = target_git_object_retriever._get_updater(rev)
407
407
    tree_supplement = mapping.get_fileid_map(lookup_object, o.tree)
408
408
    inv_delta, unusual_modes = import_git_tree(repo.texts,
409
 
            mapping, "", "", (base_tree, o.tree), base_bzr_tree,
 
409
            mapping, b"", b"", (base_tree, o.tree), base_bzr_tree,
410
410
            None, rev.revision_id, parent_trees,
411
411
            lookup_object, (base_mode, stat.S_IFDIR), store_updater,
412
412
            tree_supplement.lookup_file_id,
475
475
        head = heads.pop()
476
476
        if head == ZERO_SHA:
477
477
            continue
478
 
        if type(head) is not str:
 
478
        if not isinstance(head, bytes):
479
479
            raise TypeError(head)
480
480
        try:
481
481
            o = lookup_object(head)