~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/reconcile.py

  • Committer: Matt Nordhoff
  • Date: 2009-06-23 05:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4474.
  • Revision ID: mnordhoff@mattnordhoff.com-20090623051207-fksdtbzkwtnrw9dd
Update _add_text docstrings that still referred to add_text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    repofmt,
34
34
    )
35
35
from bzrlib.trace import mutter, note
36
 
from bzrlib.tsort import topo_sort
 
36
from bzrlib.tsort import TopoSorter
37
37
from bzrlib.versionedfile import AdapterFactory, FulltextContentFactory
38
38
 
39
39
 
137
137
    def _reconcile_revision_history(self):
138
138
        repo = self.branch.repository
139
139
        last_revno, last_revision_id = self.branch.last_revision_info()
140
 
        real_history = []
141
 
        try:
142
 
            for revid in repo.iter_reverse_revision_history(
143
 
                    last_revision_id):
144
 
                real_history.append(revid)
145
 
        except errors.RevisionNotPresent:
146
 
            pass # Hit a ghost left hand parent
 
140
        real_history = list(repo.iter_reverse_revision_history(
 
141
                                last_revision_id))
147
142
        real_history.reverse()
148
143
        if last_revno != len(real_history):
149
144
            self.fixed_history = True
247
242
 
248
243
        # we have topological order of revisions and non ghost parents ready.
249
244
        self._setup_steps(len(self._rev_graph))
250
 
        revision_keys = [(rev_id,) for rev_id in topo_sort(self._rev_graph)]
 
245
        revision_keys = [(rev_id,) for rev_id in
 
246
            TopoSorter(self._rev_graph.items()).iter_topo_order()]
251
247
        stream = self._change_inv_parents(
252
248
            self.inventory.get_record_stream(revision_keys, 'unordered', True),
253
249
            self._new_inv_parents,
377
373
        new_inventories = self.repo._temp_inventories()
378
374
        # we have topological order of revisions and non ghost parents ready.
379
375
        graph = self.revisions.get_parent_map(self.revisions.keys())
380
 
        revision_keys = topo_sort(graph)
 
376
        revision_keys = list(TopoSorter(graph).iter_topo_order())
381
377
        revision_ids = [key[-1] for key in revision_keys]
382
378
        self._setup_steps(len(revision_keys))
383
379
        stream = self._change_inv_parents(