~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-07-09 13:58:59 UTC
  • mfrom: (3533.2.1 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080709135859-wq3r1d1fjcafelgw
(jam) (bug #243536) tsort.merge_sorted() can ignore ghosts in the
        mainline history passed in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
351
351
            if parent is None:
352
352
                # end of mainline_revisions history
353
353
                continue
354
 
            if self._graph[revision][0] == parent:
 
354
            graph_parent_ids = self._graph[revision]
 
355
            if not graph_parent_ids:
 
356
                # We ran into a ghost, skip over it, this is a workaround for
 
357
                # bug #243536, the _graph has had ghosts stripped, but the
 
358
                # mainline_revisions have not
 
359
                continue
 
360
            if graph_parent_ids[0] == parent:
355
361
                continue
356
362
            # remove it from its prior spot
357
363
            self._graph[revision].remove(parent)