[util] fix first_known_successors computation(closes #117630)

Bad copy paste used the precursors data of marker, not the successors

authorPierre-Yves David <pierre-yves.david@logilab.fr>
changeset120cbf8fb117
branchdefault
phasepublic
hiddenno
parent revision#ec7ba95acdab graph: prevent obsolescence cycle to confuse graph algorithm
child revision#60613a7a2bc0 [util] protect first know successors from obsolescence cycle (see #116957)
files modified by this revision
hgviewlib/util.py
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1359126983 -3600
# Fri Jan 25 16:16:23 2013 +0100
# Node ID 120cbf8fb117d5f6682aa611aee296e03a8a666f
# Parent ec7ba95acdab7091effcbdf9ce9ba7ea1e3dccb7
[util] fix first_known_successors computation(closes #117630)

Bad copy paste used the precursors data of marker, not the successors

diff --git a/hgviewlib/util.py b/hgviewlib/util.py
@@ -168,13 +168,14 @@
1              crev = nm.get(current)
2              if crev is not None and crev not in excluded:
3                  yield ctx._repo[crev]
4              else:
5                  for mark in successorsmarkers(obsstore, current):
6 -                    if mark[0] not in seen:
7 -                        candidates.add(mark[0])
8 -                        seen.add(mark[0])
9 +                    for succ in mark[1]:
10 +                        if succ not in seen:
11 +                            candidates.add(succ)
12 +                            seen.add(succ)
13 
14  def build_repo(ui, path):
15      """build a repo like hg.repository
16 
17      But ensure it is not filtered whatever the version used"""