[PATCH evolve-ext] evolve: add new test case for split commits

Laurent Charignon lcharignon at fb.com
Tue Jun 23 17:57:56 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1435002261 25200
#      Mon Jun 22 12:44:21 2015 -0700
# Node ID 0c8e3e3cc478acf80ef5328bf61f73f0066ae208
# Parent  6db55f28c965b6cf555c78b308ff54c44e32e5f1
evolve: add new test case for split commits

This patch adds a new test case in a new test file for split commits.

diff --git a/tests/test-evolve-split.t b/tests/test-evolve-split.t
new file mode 100644
--- /dev/null
+++ b/tests/test-evolve-split.t
@@ -0,0 +1,61 @@
+Check that evolve shows error while handling split commits
+--------------------------------------
+  $ cat >> $HGRCPATH <<EOF
+  > [defaults]
+  > amend=-d "0 0"
+  > fold=-d "0 0"
+  > [web]
+  > push_ssl = false
+  > allow_push = *
+  > [phases]
+  > publish = False
+  > [diff]
+  > git = 1
+  > unified = 0
+  > [ui]
+  > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n
+  > [extensions]
+  > hgext.graphlog=
+  > EOF
+  $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
+  $ mkcommit() {
+  >    echo "$1" > "$1"
+  >    hg add "$1"
+  >    hg ci -m "add $1"
+  > }
+
+  $ hg init split
+  $ cd split
+  $ mkcommit aa
+
+Create a split commit
+  $ printf "oo" > oo;
+  $ printf "pp" > pp;
+  $ hg add oo pp
+  $ hg commit -m "oo+pp"
+  $ mkcommit uu
+  $ hg up 0
+  0 files updated, 0 files merged, 3 files removed, 0 files unresolved
+  $ printf "oo" > oo;
+  $ hg add oo
+  $ hg commit -m "_oo"
+  created new head
+  $ printf "pp" > pp;
+  $ hg add pp
+  $ hg commit -m "_pp"
+  $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')"
+  1 changesets pruned
+  1 new unstable changesets
+  $ hg log -G
+  @  4:d0dcf24cddd3 at default(draft) _pp
+  |
+  o  3:a7fdfda64c08 at default(draft) _oo
+  |
+  | o  2:f52200b086ca at default(draft) add uu
+  | |
+  | x  1:d55647aaa0c6 at default(draft) oo+pp
+  |/
+  o  0:58663bb03074 at default(draft) add aa
+  
+  $ hg evolve --rev "0::"
+  does not handle split parents yet


More information about the Mercurial-devel mailing list