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

  • Committer: Aaron Bentley
  • Date: 2008-06-06 16:40:46 UTC
  • mfrom: (3482 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3483.
  • Revision ID: aaron@aaronbentley.com-20080606164046-ghbxplxuhtpcb9iz
Merge with bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1085
1085
                raise errors.GhostRevisionUnusableHere(parents_list[0][0])
1086
1086
        real_trees = []
1087
1087
        ghosts = []
 
1088
 
 
1089
        parent_ids = [rev_id for rev_id, tree in parents_list]
 
1090
        graph = self.branch.repository.get_graph()
 
1091
        heads = graph.heads(parent_ids)
 
1092
        accepted_revisions = set()
 
1093
 
1088
1094
        # convert absent trees to the null tree, which we convert back to
1089
1095
        # missing on access.
1090
1096
        for rev_id, tree in parents_list:
 
1097
            if len(accepted_revisions) > 0:
 
1098
                # we always accept the first tree
 
1099
                if rev_id in accepted_revisions or rev_id not in heads:
 
1100
                    # We have already included either this tree, or its
 
1101
                    # descendent, so we skip it.
 
1102
                    continue
1091
1103
            _mod_revision.check_not_reserved_id(rev_id)
1092
1104
            if tree is not None:
1093
1105
                real_trees.append((rev_id, tree))
1095
1107
                real_trees.append((rev_id,
1096
1108
                    self.branch.repository.revision_tree(None)))
1097
1109
                ghosts.append(rev_id)
 
1110
            accepted_revisions.add(rev_id)
1098
1111
        dirstate.set_parent_trees(real_trees, ghosts=ghosts)
1099
1112
        self._make_dirty(reset_inventory=False)
1100
1113
 
1309
1322
        control_files.create_lock()
1310
1323
        control_files.lock_write()
1311
1324
        transport.put_bytes('format', self.get_format_string(),
1312
 
            mode=control_files._file_mode)
 
1325
            mode=a_bzrdir._get_file_mode())
1313
1326
        if from_branch is not None:
1314
1327
            branch = from_branch
1315
1328
        else:
2540
2553
        """Change the format marker."""
2541
2554
        tree._transport.put_bytes('format',
2542
2555
            self.target_format.get_format_string(),
2543
 
            mode=tree._control_files._file_mode)
 
2556
            mode=tree.bzrdir._get_file_mode())