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

  • Committer: Gerard Krol
  • Date: 2010-01-29 21:54:48 UTC
  • mto: (5020.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5021.
  • Revision ID: gerard_@gna.org-20100129215448-n2v1yimzjpoov8hx
FIXED

Show diffs side-by-side

added added

removed removed

Lines of Context:
2280
2280
            base_rev_id = graph.find_unique_lca(revision, old_tip)
2281
2281
            base_tree = self.branch.repository.revision_tree(base_rev_id)
2282
2282
            other_tree = self.branch.repository.revision_tree(old_tip)
 
2283
            
2283
2284
            result += merge.merge_inner(
2284
2285
                                  self.branch,
2285
2286
                                  other_tree,
2302
2303
                    or basis.inventory.root.file_id != to_root_id):
2303
2304
                    self.set_root_id(to_root_id)
2304
2305
                    self.flush()
 
2306
                if already_merged:
 
2307
                    graph = self.branch.repository.get_graph()
 
2308
                    base_rev_id = graph.find_unique_lca(revision, last_rev)
 
2309
                    base_tree = self.branch.repository.revision_tree(base_rev_id)
 
2310
                else:
 
2311
                    base_tree = basis
 
2312
 
2305
2313
                result += merge.merge_inner(
2306
2314
                                      self.branch,
2307
2315
                                      to_tree,
2308
 
                                      basis,
 
2316
                                      base_tree,
2309
2317
                                      this_tree=self,
2310
2318
                                      change_reporter=change_reporter)
2311
2319
                self.set_last_revision(revision)
2327
2335
            last_rev = parent_trees[0][0]
2328
2336
        if already_merged:
2329
2337
            self.add_parent_tree_id(old_tip)
2330
 
            return result
2331
 
        if (old_tip is not None and not _mod_revision.is_null(old_tip)
2332
 
            and old_tip != last_rev):
2333
 
            # our last revision was not the prior branch last revision
2334
 
            # and we have converted that last revision to a pending merge.
2335
 
            # base is somewhere between the branch tip now
2336
 
            # and the now pending merge
2337
 
 
2338
 
            # Since we just modified the working tree and inventory, flush out
2339
 
            # the current state, before we modify it again.
2340
 
            # TODO: jam 20070214 WorkingTree3 doesn't require this, dirstate
2341
 
            #       requires it only because TreeTransform directly munges the
2342
 
            #       inventory and calls tree._write_inventory(). Ultimately we
2343
 
            #       should be able to remove this extra flush.
2344
 
            self.flush()
2345
 
            graph = self.branch.repository.get_graph()
2346
 
            base_rev_id = graph.find_unique_lca(revision, old_tip)
2347
 
            base_tree = self.branch.repository.revision_tree(base_rev_id)
2348
 
            other_tree = self.branch.repository.revision_tree(old_tip)
2349
 
            result += merge.merge_inner(
2350
 
                                  self.branch,
2351
 
                                  other_tree,
2352
 
                                  base_tree,
2353
 
                                  this_tree=self,
2354
 
                                  change_reporter=change_reporter)
2355
 
            self.add_parent_tree_id(old_tip)
2356
2338
        return result
2357
2339
 
2358
2340
    def _write_hashcache_if_dirty(self):