tests/test-obsolete.t
changeset 143 0599fb01dc41
parent 136 915728be8afd
child 144 f387658d6d22
--- a/tests/test-obsolete.t	Thu Mar 08 12:21:01 2012 +0100
+++ b/tests/test-obsolete.t	Thu Mar 08 13:56:27 2012 +0100
@@ -6,6 +6,8 @@
   > publish=False
   > [obsolete]
   > secret-unstable=no
+  > [alias]
+  > odiff=diff --rev 'limit(obsparents(.),1)' --rev .
   > [extensions]
   > EOF
   $ echo "obsolete=$(echo $(dirname $TESTDIR))/hgext/obsolete.py" >> $HGRCPATH
@@ -51,6 +53,26 @@
   2
   - 4538525df7e2
 
+Test that obsolete parent a properly computed
+
+  $ qlog -r 'obsparents(.)' --hidden
+  2
+  - 4538525df7e2
+  $ qlog -r .
+  3
+  - 0d3f46688ccc
+  $ hg odiff
+  diff -r 4538525df7e2 -r 0d3f46688ccc c
+  --- a/c	Thu Jan 01 00:00:00 1970 +0000
+  +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  @@ -1,1 +0,0 @@
+  -c
+  diff -r 4538525df7e2 -r 0d3f46688ccc obsol_c
+  --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+  +++ b/obsol_c	Thu Jan 01 00:00:00 1970 +0000
+  @@ -0,0 +1,1 @@
+  +obsol_c
+
 test obsolete changeset with no-obsolete descendant
   $ hg up 1 -q
   $ mkcommit "obsol_c'" # 4 (on 1)