/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-07-18 23:14:00 UTC
  • mfrom: (7490.40.62 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200718231400-jaes9qltn8oi8xss
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
 
47
47
 
48
48
from .mapping import (
 
49
    encode_git_path,
49
50
    object_mode,
50
51
    fix_person_identifier,
51
52
    )
80
81
                     entry_factory[change.kind[1]](
81
82
                         change.file_id, change.name[1], change.parent_id[1])))
82
83
                if change.kind[0] in ("file", "symlink"):
83
 
                    self._blobs[change.path[0].encode("utf-8")] = None
 
84
                    self._blobs[encode_git_path(change.path[0])] = None
84
85
                    self._any_changes = True
85
86
                if change.path[1] == "":
86
87
                    seen_root = True
88
89
            self._any_changes = True
89
90
            if change.path[1] is None:
90
91
                self._inv_delta.append((change.path[0], change.path[1], change.file_id, None))
91
 
                self._deleted_paths.add(change.path[0].encode("utf-8"))
 
92
                self._deleted_paths.add(encode_git_path(change.path[0]))
92
93
                continue
93
94
            try:
94
95
                entry_kls = entry_factory[change.kind[1]]
110
111
            elif change.kind[1] == "symlink":
111
112
                symlink_target = workingtree.get_symlink_target(change.path[1])
112
113
                blob = Blob()
113
 
                blob.data = symlink_target.encode("utf-8")
 
114
                blob.data = encode_git_path(symlink_target)
114
115
                self.store.add_object(blob)
115
116
                sha = blob.id
116
117
                entry.symlink_target = symlink_target
125
126
            mode = object_mode(change.kind[1], change.executable[1])
126
127
            self._inv_delta.append((change.path[0], change.path[1], change.file_id, entry))
127
128
            if change.path[0] is not None:
128
 
                self._deleted_paths.add(change.path[0].encode("utf-8"))
129
 
            self._blobs[change.path[1].encode("utf-8")] = (mode, sha)
 
129
                self._deleted_paths.add(encode_git_path(change.path[0]))
 
130
            self._blobs[encode_git_path(change.path[1])] = (mode, sha)
130
131
            if st is not None:
131
132
                yield change.path[1], (entry.text_sha1, st)
132
133
        if not seen_root and len(self.parents) == 0: