add obsolete parents wrapper to the 'parents' command
although the command itself cannot *cause* obsolete changesets, the
information is rather relevant to the state of the parents
--- a/README Wed Oct 16 18:23:54 2013 +0200
+++ b/README Wed Oct 16 18:28:52 2013 +0200
@@ -50,6 +50,7 @@
- added a small extension to experiment with obsolescence marker push
- amend: drop the deprecated note option
- amend: use core mechanism for amend (fix multiple bugs)
+- parents command: add "working directory parent is obsolete" message
3.1.0 -- 2013-02-11
--- a/hgext/evolve.py Wed Oct 16 18:23:54 2013 +0200
+++ b/hgext/evolve.py Wed Oct 16 18:28:52 2013 +0200
@@ -557,6 +557,7 @@
# This section take care of issue warning to the user when troubles appear
@eh.wrapcommand("update")
+@eh.wrapcommand("parents")
@eh.wrapcommand("pull")
def wrapmayobsoletewc(origfn, ui, repo, *args, **opts):
"""Warn that the working directory parent is an obsolete changeset"""
--- a/tests/test-obsolete.t Wed Oct 16 18:23:54 2013 +0200
+++ b/tests/test-obsolete.t Wed Oct 16 18:28:52 2013 +0200
@@ -120,6 +120,15 @@
- 725c380fe99b
$ hg up --hidden 3 -q
working directory parent is obsolete!
+(reported by parents too)
+ $ hg parents
+ changeset: 3:0d3f46688ccc
+ parent: 1:7c3bad9141dc
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: add obsol_c
+
+ working directory parent is obsolete!
$ mkcommit d # 5 (on 3)
1 new unstable changesets
$ qlog -r 'obsolete()'