tests/test-basic.t
changeset 13568 0b79cf616e65
parent 12156 4c94b6d0fb1c
child 13956 ffb5c09ba822
--- a/tests/test-basic.t	Tue Mar 08 14:55:31 2011 -0600
+++ b/tests/test-basic.t	Tue Mar 08 08:41:39 2011 -0500
@@ -20,6 +20,22 @@
   summary:     test
   
 
+Verify that updating to revision 0 via commands.update() works properly
+
+  $ cat <<EOF > update_to_rev0.py
+  > from mercurial import ui, hg, commands
+  > myui = ui.ui()
+  > repo = hg.repository(myui, path='.')
+  > commands.update(myui, repo, rev=0)
+  > EOF
+  $ hg up null
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  $ python ./update_to_rev0.py
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ hg identify -n
+  0
+ 
+
 Poke around at hashes:
 
   $ hg manifest --debug