changeset 31708:cda83a1bfb3a

summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete.
author Denis Laxalde <denis@laxalde.org>
date Sat, 25 Mar 2017 11:30:08 +0100
parents 00f996f05522
children cbe0bea82c79
files mercurial/commands.py tests/test-obsolete.t
diffstat 2 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Mar 25 10:40:29 2017 +0100
+++ b/mercurial/commands.py	Sat Mar 25 11:30:08 2017 +0100
@@ -4834,6 +4834,8 @@
                 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)
--- a/tests/test-obsolete.t	Sat Mar 25 10:40:29 2017 +0100
+++ b/tests/test-obsolete.t	Sat Mar 25 11:30:08 2017 +0100
@@ -851,6 +851,17 @@
   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
 ===============================================================================