Patchwork [2,of,8] test: improve documentation of some histedit test

login
register
mail settings
Submitter Pierre-Yves David
Date April 16, 2013, 7:20 p.m.
Message ID <23ef999431192b42f5a7.1366140031@yamac.lan>
Download mbox | patch
Permalink /patch/1357/
State Accepted, archived
Delegated to: Augie Fackler
Headers show

Comments

Pierre-Yves David - April 16, 2013, 7:20 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@logilab.fr>
# Date 1366122158 -7200
# Node ID 23ef999431192b42f5a75344fd90312e4adb3e3b
# Parent  cc166f7758b21cf809a7d0713f614f0b9d80e394
test: improve documentation of some histedit test

Each different test are clearly separated from the other and gain some
documentation.

Patch

diff --git a/tests/test-histedit-fold.t b/tests/test-histedit-fold.t
--- a/tests/test-histedit-fold.t
+++ b/tests/test-histedit-fold.t
@@ -1,22 +1,28 @@ 
+Test histedit extention: Fold commands
+======================================
+
+This test file is dedicated to testing the fold command in non conflicting
+case.
+
+Initialization
+---------------
+
+
   $ . "$TESTDIR/histedit-helpers.sh"
 
   $ cat >> $HGRCPATH <<EOF
   > [ui]
   > logtemplate = {rev}:{node|short} {desc|firstline}'\n
   > [extensions]
   > graphlog=
   > histedit=
   > EOF
 
-  $ EDITED="$TESTTMP/editedhistory"
-  $ cat > $EDITED <<EOF
-  > pick e860deea161a e
-  > pick 652413bf663e f
-  > fold 177f92b77385 c
-  > pick 055a42cdd887 d
-  > EOF
+
+Simple folding
+--------------------
   $ initrepo ()
   > {
   >     hg init r
   >     cd r
   >     for x in a b c d e f ; do
@@ -26,11 +32,12 @@ 
   >     done
   > }
 
   $ initrepo
 
-log before edit
+Initial log
+
   $ hg log --graph
   @  5:652413bf663e f'
   |
   o  4:e860deea161a e'
   |
@@ -41,11 +48,17 @@  log before edit
   o  1:d2ae7f538514 b'
   |
   o  0:cb9a9f314b8b a'
   
 
-edit the history
+  $ EDITED="$TESTTMP/editedhistory"
+  $ cat > $EDITED <<EOF
+  > pick e860deea161a e
+  > pick 652413bf663e f
+  > fold 177f92b77385 c
+  > pick 055a42cdd887 d
+  > EOF
   $ HGEDITOR="cat \"$EDITED\" > " hg histedit 177f92b77385 2>&1 | fixbundle
   0 files updated, 0 files merged, 4 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 0 files removed, 0 files unresolved
   0 files updated, 0 files merged, 2 files removed, 0 files unresolved
@@ -82,10 +95,14 @@  check histedit_source
   3:5e24935bad3d pick e860deea161a e'
 
   $ cd ..
 
 folding and creating no new change doesn't break:
+-------------------------------------------------
+
+folded content is dropped during a merge.
+
   $ mkdir fold-to-empty-test
   $ cd fold-to-empty-test
   $ hg init
   $ printf "1\n2\n3\n" > file
   $ hg add file
@@ -141,10 +158,15 @@  should effectively drop the changes from
   o  0:0189ba417d34 1+2+3'
   
 
   $ cd ..
 
+
+Test fold through dropped
+-------------------------
+
+
 Test corner case where folded revision is separated from its parent by a
 dropped revision.
 
 
   $ hg init fold-with-dropped