[PATCH 1 of 2 evolve-ext] test-evolve-bumped: improve tests legibility

Laurent Charignon lcharignon at fb.com
Fri Jun 19 20:38:23 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1434762991 25200
#      Fri Jun 19 18:16:31 2015 -0700
# Node ID bd83396dd93f1c13efdba3140c2a92c6aed2be9f
# Parent  8794a4680bdd78fe9e452611797f9b018fc031df
test-evolve-bumped: improve tests legibility

This patch introduces in test-evolve-bumped some of the test helpers that we
use in other tests to make the code more legible.

diff --git a/tests/test-evolve-bumped.t b/tests/test-evolve-bumped.t
--- a/tests/test-evolve-bumped.t
+++ b/tests/test-evolve-bumped.t
@@ -1,6 +1,11 @@
   $ hg init public
   $ cd public
   $ echo a > a
+  $ mkcommit() {
+  >    echo "$1" > "$1"
+  >    hg add "$1"
+  >    hg ci -m "add $1"
+  > }
   $ hg commit -A -m init
   adding a
   $ cd ..
@@ -11,6 +16,8 @@
   $ cat >> .hg/hgrc <<EOF
   > [extensions]
   > evolve = $evolvepath
+  > [ui]
+  > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n
   > [phases]
   > publish = false
   > EOF
@@ -32,12 +39,7 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files
   $ hg log -r 'draft()'
-  changeset:   1:4d1169d82e47
-  tag:         tip
-  user:        alice
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     modify a
-  
+  1:4d1169d82e47 at default(draft) modify a
 
   $ cd ../bob
   $ hg pull ../private
@@ -49,12 +51,7 @@
   added 1 changesets with 1 changes to 1 files
   (run 'hg update' to get a working copy)
   $ hg log -r 'draft()'
-  changeset:   1:4d1169d82e47
-  tag:         tip
-  user:        alice
-  date:        Thu Jan 01 00:00:00 1970 +0000
-  summary:     modify a
-  
+  1:4d1169d82e47 at default(draft) modify a
   $ hg push ../public
   pushing to ../public
   searching for changes


More information about the Mercurial-devel mailing list