tests/test-revset-dirstate-parents.t
changeset 12928 a5f7f1e9340e
child 12929 515c2786e1cf
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-revset-dirstate-parents.t	Thu Nov 04 16:59:03 2010 -0500
@@ -0,0 +1,42 @@
+  $ HGENCODING=utf-8
+  $ export HGENCODING
+
+  $ try() {
+  >   hg debugrevspec --debug $@
+  > }
+
+  $ log() {
+  >   hg log --template '{rev}\n' -r "$1"
+  > }
+
+  $ hg init repo
+  $ cd repo
+
+  $ try 'p1()'
+  ('func', ('symbol', 'p1'), None)
+  -1
+  $ try 'p2()'
+  ('func', ('symbol', 'p2'), None)
+
+null revision
+  $ log 'p1()'
+  $ log 'p2()'
+
+working dir with a single parent
+  $ echo a > a
+  $ hg ci -Aqm0
+  $ log 'p1()'
+  0
+  $ log 'p2()'
+
+merge in progress
+  $ echo b > b
+  $ hg ci -Aqm1
+  $ hg up -q 0
+  $ echo c > c
+  $ hg ci -Aqm2
+  $ hg merge -q
+  $ log 'p1()'
+  2
+  $ log 'p2()'
+  1