~jelmer/brz/dulwich-compat

« back to all changes in this revision

Viewing changes to breezy/git/workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2021-05-24 22:47:03 UTC
  • Revision ID: jelmer@jelmer.uk-20210524224703-vcqjrv8ua4ltppg5
Fix dulwich compatibility.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
from dulwich.file import GitFile, FileLocked
30
30
from dulwich.index import (
31
31
    Index,
 
32
    IndexEntry,
32
33
    SHA1Writer,
33
34
    build_index_from_tree,
34
35
    index_entry_from_path,
1142
1143
            add_entry(dirname, 'directory')
1143
1144
            dirname = decode_git_path(dirname)
1144
1145
            dir_file_id = self.path2id(dirname)
1145
 
            if not isinstance(value, tuple) or len(value) != 10:
 
1146
            if not isinstance(value, (tuple, IndexEntry)):
1146
1147
                raise ValueError(value)
1147
1148
            per_dir[(dirname, dir_file_id)].add(
1148
1149
                (decode_git_path(path), decode_git_path(child_name),