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

  • Committer: Jelmer Vernooij
  • Date: 2019-06-22 12:07:42 UTC
  • mfrom: (7356 work)
  • mto: This revision was merged to the branch mainline in revision 7357.
  • Revision ID: jelmer@jelmer.uk-20190622120742-cxdr5la8cav78tho
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
209
209
        else:
210
210
            self.case_sensitive = False
211
211
 
 
212
    def get_transform(self, pb=None):
 
213
        from ..transform import TreeTransform
 
214
        return TreeTransform(self, pb=pb)
 
215
 
212
216
    def merge_modified(self):
213
217
        return {}
214
218
 
1198
1202
                    (index, subpath) = self._lookup_index(entry.path)
1199
1203
                    index[subpath] = index_entry_from_stat(st, entry.sha, 0)
1200
1204
 
 
1205
    def _update_git_tree(self, old_revision, new_revision, change_reporter=None,
 
1206
                         show_base=False):
 
1207
        basis_tree = self.revision_tree(old_revision)
 
1208
        if new_revision != old_revision:
 
1209
            with basis_tree.lock_read():
 
1210
                new_basis_tree = self.branch.basis_tree()
 
1211
                merge.merge_inner(
 
1212
                    self.branch,
 
1213
                    new_basis_tree,
 
1214
                    basis_tree,
 
1215
                    this_tree=self,
 
1216
                    change_reporter=change_reporter,
 
1217
                    show_base=show_base)
 
1218
 
1201
1219
    def pull(self, source, overwrite=False, stop_revision=None,
1202
1220
             change_reporter=None, possible_transports=None, local=False,
1203
1221
             show_base=False):
1204
1222
        with self.lock_write(), source.lock_read():
1205
1223
            old_revision = self.branch.last_revision()
1206
 
            basis_tree = self.basis_tree()
1207
1224
            count = self.branch.pull(source, overwrite, stop_revision,
1208
1225
                                     possible_transports=possible_transports,
1209
1226
                                     local=local)
1210
 
            new_revision = self.branch.last_revision()
1211
 
            if new_revision != old_revision:
1212
 
                with basis_tree.lock_read():
1213
 
                    new_basis_tree = self.branch.basis_tree()
1214
 
                    merge.merge_inner(
1215
 
                        self.branch,
1216
 
                        new_basis_tree,
1217
 
                        basis_tree,
1218
 
                        this_tree=self,
1219
 
                        change_reporter=change_reporter,
1220
 
                        show_base=show_base)
 
1227
            self._update_git_tree(
 
1228
                old_revision=old_revision,
 
1229
                new_revision=self.branch.last_revision(),
 
1230
                change_reporter=change_reporter,
 
1231
                show_base=show_base)
1221
1232
            return count
1222
1233
 
1223
1234
    def add_reference(self, sub_tree):