test-histedit: fix instability creation test
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Wed, 16 Jan 2013 19:17:36 +0100
changeset 18438 81e77a8820f3
parent 18437 358c23e8f1c6
child 18439 c6e3fa134da5
test-histedit: fix instability creation test The current test does not rewrite anything and therefor does not create any instability. We also clean up the repo state after the test. This required the rebase extension.
tests/test-histedit-obsolete.t
--- a/tests/test-histedit-obsolete.t	Wed Jan 16 19:14:22 2013 +0100
+++ b/tests/test-histedit-obsolete.t	Wed Jan 16 19:17:36 2013 +0100
@@ -14,6 +14,7 @@
   > publish=False
   > [extensions]'
   > histedit=
+  > rebase=
   > 
   > obs=${TESTTMP}/obs.py
   > EOF
@@ -148,8 +149,25 @@
 
   $ hg up '.^'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg phase --force --draft .
+  $ hg ph --force --draft '.'
   $ hg log -r 'children(.)'
   9:c13eb81022ca f (no-eol)
-  $ hg histedit -r '.'
+  $ cat > commands.txt <<EOF
+  > edit b346ab9a313d 6 c
+  > EOF
+  $ hg histedit -r '.' --commands commands.txt
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  adding c
+  abort: Make changes as needed, you may commit or record as needed now.
+  When you are finished, run hg histedit --continue to resume.
+  [255]
+  $ echo c >> c
+  $ hg histedit --continue
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+  $ hg log -r 'unstable()'
+  9:c13eb81022ca f (no-eol)
+
+stabilise
+
+  $ hg rebase  -r 'unstable()' -d .