test-phases: test changing null revision phase
authorPatrick Mezard <patrick@mezard.eu>
Thu, 10 May 2012 18:21:15 +0200
changeset 16622 e4451d7432fa
parent 16621 8c3c9031f5aa
child 16623 def6a19c3b4d
test-phases: test changing null revision phase The behaviour is correct but for bad reasons: the repo.set() call in phase command fails for '-1'. It should be rejected explicitely by phase boundary commands, sadly this is hard to do because phase changes are not applied atomically.
tests/test-phases.t
--- a/tests/test-phases.t	Fri May 11 14:48:24 2012 +0200
+++ b/tests/test-phases.t	Thu May 10 18:21:15 2012 +0200
@@ -9,6 +9,15 @@
 
   $ hg init initialrepo
   $ cd initialrepo
+
+Cannot change null revision phase
+
+  $ hg phase --force --secret null
+  abort: unknown revision '-1'!
+  [255]
+  $ hg phase null
+  -1: public
+
   $ mkcommit A
 
 New commit are draft by default