Patchwork [3,of,5] test-histedit: fix instability creation test

login
register
mail settings
Submitter Pierre-Yves David
Date Jan. 16, 2013, 6:28 p.m.
Message ID <5be4bc70c20574a1ea3a.1358360897@crater2.logilab.fr>
Download mbox | patch
Permalink /patch/656/
State Accepted
Commit 81e77a8820f353cb52094480fa6b736dffde84f8
Headers show

Comments

Pierre-Yves David - Jan. 16, 2013, 6:28 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1358360256 -3600
# Node ID 5be4bc70c20574a1ea3af9ce99b7921922ace0ef
# Parent  9a39e144ac7a29debbbd9b63904b40e980278642
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.

Patch

diff --git a/tests/test-histedit-obsolete.t b/tests/test-histedit-obsolete.t
--- a/tests/test-histedit-obsolete.t
+++ b/tests/test-histedit-obsolete.t
@@ -12,10 +12,11 @@  Enable obsolete
   > logtemplate= {rev}:{node|short} {desc|firstline}
   > [phases]
   > publish=False
   > [extensions]'
   > histedit=
+  > rebase=
   > 
   > obs=${TESTTMP}/obs.py
   > EOF
 
   $ hg init base
@@ -146,10 +147,27 @@  Check that histedit respect phases
 Test that rewriting leaving instability behind is allowed
 ---------------------------------------------------------------------
 
   $ hg up '.^'
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  $ hg phase --force --draft .
+  $ hg ph -fd '.'
   $ 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 .