/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: Breezy landing bot
  • Author(s): Vincent Ladeuil
  • Date: 2019-06-18 17:47:33 UTC
  • mfrom: (7350.1.3 trunk)
  • Revision ID: breezy.the.bot@gmail.com-20190618174733-da1lo1e8a10ap9db
Merge 3.0 into trunk resolving conflicts

Merged from https://code.launchpad.net/~vila/brz/trunk/+merge/368964

Show diffs side-by-side

added added

removed removed

Lines of Context:
1198
1198
                    (index, subpath) = self._lookup_index(entry.path)
1199
1199
                    index[subpath] = index_entry_from_stat(st, entry.sha, 0)
1200
1200
 
 
1201
    def _update_git_tree(self, old_revision, new_revision, change_reporter=None,
 
1202
                         show_base=False):
 
1203
        basis_tree = self.revision_tree(old_revision)
 
1204
        if new_revision != old_revision:
 
1205
            with basis_tree.lock_read():
 
1206
                new_basis_tree = self.branch.basis_tree()
 
1207
                merge.merge_inner(
 
1208
                    self.branch,
 
1209
                    new_basis_tree,
 
1210
                    basis_tree,
 
1211
                    this_tree=self,
 
1212
                    change_reporter=change_reporter,
 
1213
                    show_base=show_base)
 
1214
 
1201
1215
    def pull(self, source, overwrite=False, stop_revision=None,
1202
1216
             change_reporter=None, possible_transports=None, local=False,
1203
1217
             show_base=False):
1204
1218
        with self.lock_write(), source.lock_read():
1205
1219
            old_revision = self.branch.last_revision()
1206
 
            basis_tree = self.basis_tree()
1207
1220
            count = self.branch.pull(source, overwrite, stop_revision,
1208
1221
                                     possible_transports=possible_transports,
1209
1222
                                     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)
 
1223
            self._update_git_tree(
 
1224
                old_revision=old_revision,
 
1225
                new_revision=self.branch.last_revision(),
 
1226
                change_reporter=change_reporter,
 
1227
                show_base=show_base)
1221
1228
            return count
1222
1229
 
1223
1230
    def add_reference(self, sub_tree):