Graph.heads() gives false heads if ghosts prevent accurate answers

Bug #182715 reported by Robert Collins on 2008-01-13
2
Affects Status Importance Assigned to Milestone
Bazaar
Medium
Unassigned
Breezy
Medium
Unassigned

Bug Description

The heads() api needs another return value to indicate when it could not
determine an answer - when a revision is neither reachable from the
other candidates, nor reaches one of them, but disjoint ghosts were
encountered during the search path.

10:05 < abentley> If the revision itself is a ghost, but is not
reachable from candidate heads, it must be a head.
10:07 < abentley> We may wind up with some false heads if some
descendant is a ghost. I don't think we can avoid that. But we can
know whether the ghost revision itself is a head.
10:09 < lifeless> the if the revision is /not/ a ghost, but is not
reached, and we encounted ghosts, we cannot tell if it is a head or not,
unless it reached the other heads
10:09 < lifeless> if the revision is a ghost, it is not a head if it is
reachable from some other head
10:09 < lifeless> so yes we have to consider ghosts in heads(), but we
need to know within heads() which are ghosts and which aren't to know
whether to say 'head', or 'indeterminate'
10:10 < abentley> lifeless: agreed.
10:10 < lifeless> we can avoid ending up with false heads if our api is
allowed to signal that it could not determine the answer. Which any
ghost handling api must be able to do
10:11 < lifeless> this is ok, it just means that we're not finished with
heads()

 affects bzr
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Martin Pool (mbp) on 2008-11-28
Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
summary: - Graph.heads() gives false heads sometimes
+ Graph.heads() gives false heads if ghosts prevent accurate answers
Jelmer Vernooij (jelmer) on 2011-02-01
tags: added: api ghost graph
Jelmer Vernooij (jelmer) on 2017-11-08
tags: added: check-for-breezy
Jelmer Vernooij (jelmer) on 2018-11-05
Changed in brz:
status: New → Triaged
importance: Undecided → Medium
tags: removed: check-for-breezy
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers