# HG changeset patch # User Denis Laxalde # Date 2017-03-25 10:30:08 # Node ID cda83a1bfb3ac3a23cfa158c407be93755c1018e # Parent 00f996f055222a3be1d0b763437d51a497aae37e summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete. diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4834,6 +4834,8 @@ def summary(ui, repo, **opts): ui.write(_(' (empty repository)')) else: ui.write(_(' (no revision checked out)')) + if p.obsolete(): + ui.write(_(' (obsolete)')) if p.troubled(): ui.write(' (' + ', '.join(ui.label(trouble, 'trouble.%s' % trouble) diff --git a/tests/test-obsolete.t b/tests/test-obsolete.t --- a/tests/test-obsolete.t +++ b/tests/test-obsolete.t @@ -851,6 +851,17 @@ test summary output phases: 4 draft unstable: 2 changesets bumped: 1 changesets + $ hg up -r 'obsolete()' + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ hg summary + parent: 6:3de5eca88c00 (obsolete) + add obsolete_e + branch: default + commit: (clean) + update: 3 new changesets (update) + phases: 4 draft + unstable: 2 changesets + bumped: 1 changesets Test incoming/outcoming with changesets obsoleted remotely, known locally ===============================================================================