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

Bug #182715 reported by Robert Collins
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
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>.

Tags: api ghost graph
Martin Pool (mbp)
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)
tags: added: api ghost graph
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.