~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

Teach Knit repositories how to handle ghosts without corrupting at all.

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
    def _reconcile_steps(self):
234
234
        """Perform the steps to reconcile this repository."""
235
235
        self._load_indexes()
236
 
        self._reinsert_revisions()
 
236
        # knits never suffer this
 
237
        self.inconsistent_parents = 0
237
238
        self._gc_inventory()
238
239
 
239
240
    def _load_indexes(self):
261
262
            self.transaction)
262
263
 
263
264
        # we have topological order of revisions and non ghost parents ready.
264
 
        self._setup_steps(len(self._rev_graph))
265
 
        for rev_id in TopoSorter(self._rev_graph.items()).iter_topo_order():
266
 
            parents = self._rev_graph[rev_id]
 
265
        self._setup_steps(len(self.revisions))
 
266
        for rev_id in TopoSorter(self.revisions.get_graph().items()).iter_topo_order():
 
267
            parents = self.revisions.get_parents(rev_id)
267
268
            # double check this really is in topological order.
268
269
            unavailable = [p for p in parents if p not in new_inventory]
269
270
            assert len(unavailable) == 0