~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tsort.py

  • Committer: Andrew Bennetts
  • Date: 2008-07-28 06:53:44 UTC
  • mfrom: (3581 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3583.
  • Revision ID: andrew.bennetts@canonical.com-20080728065344-ocndjoycs903q6fz
Merge bzr.dev.

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)