/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: 2019-08-11 13:33:45 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7389.
  • Revision ID: jelmer@jelmer.uk-20190811133345-dp9j3c569vxj4l9y
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
145
145
                yield change.path[1], (entry.text_sha1, st)
146
146
            if self._mapping.generate_file_id(encoded_new_path) != change.file_id:
147
147
                self._override_fileids[encoded_new_path] = change.file_id
148
 
            else:
149
 
                self._override_fileids[encoded_new_path] = None
150
148
        if not seen_root and len(self.parents) == 0:
151
149
            raise RootMissing()
152
150
        if getattr(workingtree, "basis_tree", False):
163
161
                continue
164
162
            self._blobs[entry.path] = (entry.mode, entry.sha)
165
163
        if not self._lossy:
166
 
            try:
167
 
                fileid_map = dict(basis_tree._fileid_map.file_ids)
168
 
            except AttributeError:
169
 
                fileid_map = {}
170
 
            for path, file_id in viewitems(self._override_fileids):
171
 
                if not isinstance(path, bytes):
172
 
                    raise TypeError(path)
173
 
                if file_id is None:
174
 
                    if path in fileid_map:
175
 
                        del fileid_map[path]
176
 
                else:
177
 
                    if not isinstance(file_id, bytes):
178
 
                        raise TypeError(file_id)
179
 
                    fileid_map[path] = file_id
180
 
            if fileid_map:
181
 
                fileid_blob = self._mapping.export_fileid_map(fileid_map)
182
 
            else:
183
 
                fileid_blob = None
184
 
            if fileid_blob is not None:
185
 
                if self._mapping.BZR_FILE_IDS_FILE is None:
186
 
                    raise SettingCustomFileIdsUnsupported(fileid_map)
187
 
                self.store.add_object(fileid_blob)
188
 
                self._blobs[self._mapping.BZR_FILE_IDS_FILE] = (
189
 
                    stat.S_IFREG | 0o644, fileid_blob.id)
190
 
            else:
191
 
                self._blobs[self._mapping.BZR_FILE_IDS_FILE] = None
 
164
            if self._override_fileids:
 
165
                raise SettingCustomFileIdsUnsupported(self._override_fileids)
192
166
        self.new_inventory = None
193
167
 
194
168
    def update_basis(self, tree):