comparison tests/test-evolve-split.t @ 1428:20a3b0b27bfe

evolve: raise MultipleSuccessorsError when computing dependency for split commits We don't know how to handle dependency for split commits yet. When facing a splitted commit, instead of silently adding the first successor to the dependency list and fail later, we do nothing.
author Laurent Charignon <lcharignon@fb.com>
date Mon, 22 Jun 2015 12:44:21 -0700
parents
children 4140d680784e
comparison
equal deleted inserted replaced
1427:fcc467ca740e 1428:20a3b0b27bfe
1 Check that evolve shows error while handling split commits
2 --------------------------------------
3 $ cat >> $HGRCPATH <<EOF
4 > [defaults]
5 > amend=-d "0 0"
6 > fold=-d "0 0"
7 > [web]
8 > push_ssl = false
9 > allow_push = *
10 > [phases]
11 > publish = False
12 > [diff]
13 > git = 1
14 > unified = 0
15 > [ui]
16 > logtemplate = {rev}:{node|short}@{branch}({phase}) {desc|firstline}\n
17 > [extensions]
18 > hgext.graphlog=
19 > EOF
20 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
21 $ mkcommit() {
22 > echo "$1" > "$1"
23 > hg add "$1"
24 > hg ci -m "add $1"
25 > }
26
27 $ hg init split
28 $ cd split
29 $ mkcommit aa
30
31 Create a split commit
32 $ printf "oo" > oo;
33 $ printf "pp" > pp;
34 $ hg add oo pp
35 $ hg commit -m "oo+pp"
36 $ mkcommit uu
37 $ hg up 0
38 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
39 $ printf "oo" > oo;
40 $ hg add oo
41 $ hg commit -m "_oo"
42 created new head
43 $ printf "pp" > pp;
44 $ hg add pp
45 $ hg commit -m "_pp"
46 $ hg prune --succ "desc(_oo) + desc(_pp)" -r "desc('oo+pp')"
47 1 changesets pruned
48 1 new unstable changesets
49 $ hg log -G
50 @ 4:d0dcf24cddd3@default(draft) _pp
51 |
52 o 3:a7fdfda64c08@default(draft) _oo
53 |
54 | o 2:f52200b086ca@default(draft) add uu
55 | |
56 | x 1:d55647aaa0c6@default(draft) oo+pp
57 |/
58 o 0:58663bb03074@default(draft) add aa
59
60 $ hg evolve --rev "0::"
61 does not handle split parents yet