/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

Tidy up the last_revision_id and add_pending_merge conversion to use cleaner apis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
520
520
            # TODO now merge from tree.last_revision to revision (to preserve
521
521
            # user local changes)
522
522
            transform_tree(tree, self)
523
 
            tree.set_parent_trees([(revision_id,
524
 
                tree.branch.repository.revision_tree(revision_id))])
 
523
            tree.set_parent_ids([revision_id])
525
524
 
526
525
    @needs_write_lock
527
526
    def commit(self, message=None, revprops=None, *args, **kwargs):
1056
1055
                finally:
1057
1056
                    pb.finished()
1058
1057
                # TODO - dedup parents list with things merged by pull ?
 
1058
                # reuse the revisiontree we merged against to set the new
 
1059
                # tree data.
1059
1060
                parent_trees = [(self.branch.last_revision(), new_basis_tree)]
 
1061
                # we have to pull the merge trees out again, because 
 
1062
                # merge_inner has set the ids. - this corner is not yet 
 
1063
                # layered well enough to prevent double handling.
1060
1064
                merges = self.get_parent_ids()[1:]
1061
1065
                parent_trees.extend([
1062
1066
                    (parent, repository.revision_tree(parent)) for
1476
1480
                                      this_tree=self)
1477
1481
                self.set_last_revision(self.branch.last_revision())
1478
1482
                # TODO - dedup parents list with things merged by pull ?
 
1483
                # reuse the tree we've updated to to set the basis:
1479
1484
                parent_trees = [(self.branch.last_revision(), to_tree)]
1480
1485
                merges = self.get_parent_ids()[1:]
 
1486
                # pull the other trees out of the repository. This could be
 
1487
                # better expressed - for instance by inserting a parent, and
 
1488
                # that would remove duplication.
1481
1489
                parent_trees.extend([
1482
1490
                    (parent, self.branch.repository.revision_tree(parent)) for
1483
1491
                     parent in merges])