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

  • Committer: Jelmer Vernooij
  • Date: 2020-08-22 16:34:02 UTC
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200822163402-k3kj9mqmgdfxrx8w
Avoid use of sixish.

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from dulwich.index import (
21
21
    commit_tree,
22
 
    read_submodule_head,
23
22
    )
24
23
import stat
25
24
 
43
42
    Blob,
44
43
    Commit,
45
44
    )
 
45
from dulwich.index import read_submodule_head
46
46
 
47
47
 
48
48
from .mapping import (
75
75
    def record_iter_changes(self, workingtree, basis_revid, iter_changes):
76
76
        seen_root = False
77
77
        for change in iter_changes:
78
 
            if change.kind == (None, None):
79
 
                # Ephemeral
80
 
                continue
81
78
            if change.versioned[0] and not change.copied:
82
79
                file_id = self._mapping.generate_file_id(change.path[0])
83
80
            elif change.versioned[1]:
118
115
                finally:
119
116
                    f.close()
120
117
                sha = blob.id
121
 
                if st is not None:
122
 
                    entry.text_size = st.st_size
123
 
                else:
124
 
                    entry.text_size = len(blob.data)
 
118
                entry.text_size = st.st_size
125
119
                entry.git_sha1 = sha
126
120
                self.store.add_object(blob)
127
121
            elif change.kind[1] == "symlink":