summary: display obsolete state of parents
authorDenis Laxalde <denis@laxalde.org>
Sat, 25 Mar 2017 11:30:08 +0100
changeset 31703 cda83a1bfb3a
parent 31702 00f996f05522
child 31704 cbe0bea82c79
summary: display obsolete state of parents Extend the "parent: " lines in summary to display "(obsolete)" when the parent is obsolete.
mercurial/commands.py
tests/test-obsolete.t
--- 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
 ===============================================================================