# HG changeset patch # User Mads Kiilerich # Date 2018-10-29 01:20:21 # Node ID 6834e12654156a1429d2cccfa22416da61c502eb # Parent b2c15f308ad23433f7eb08f79e7153ca96e6687f graph: don't try to get obsolete status for fake parent revisions Fake parents use negative revision numbers as internal placeholders. Previous Mercurial versions could handle negative non-existing revision numbers, but Mercurial 4.8 will fail on this invalid input when getting the obsolete status. Instead, make sure we only get obsolete status for actual revisions. diff --git a/kallithea/lib/graphmod.py b/kallithea/lib/graphmod.py --- a/kallithea/lib/graphmod.py +++ b/kallithea/lib/graphmod.py @@ -149,7 +149,7 @@ def _colored(repo, dag): b = branch(rev) searching = True for p in reversed(addparents): - obs[p] = int(repo[p].obsolete) + obs[p] = int(repo[p].obsolete) if p >= 0 else 0 if searching and branch(abs(p)) in [b, None]: # This is the first parent on the same branch - inherit the color colors[p] = color