Mercurial > evolve
comparison tests/test-topic-multiple.t @ 4630:f394b41fcbc7 stable
topic: add test to increase code coverage in case of multiple topics
This patch adds a test which cover the part that when we have one topic
on top of other topic, this make sure that when evolving it's boundary
are the current active topic (i.e hg stack)
author | Sushil khanchi <sushilkhanchi97@gmail.com> |
---|---|
date | Sat, 27 Apr 2019 20:56:37 +0530 |
parents | |
children | 9da0114a8a02 |
comparison
equal
deleted
inserted
replaced
4627:48df42a797f0 | 4630:f394b41fcbc7 |
---|---|
1 Testing topics on cases when we have multiple topics based on top | |
2 of other. | |
3 $ . "$TESTDIR/testlib/topic_setup.sh" | |
4 | |
5 Setup | |
6 | |
7 $ cat << EOF >> $HGRCPATH | |
8 > [experimental] | |
9 > evolution = all | |
10 > [ui] | |
11 > interactive = True | |
12 > logtemplate = {rev} - \{{get(namespaces, "topics")}} {node|short} {desc} ({phase})\n | |
13 > [extensions] | |
14 > show = | |
15 > EOF | |
16 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH | |
17 | |
18 Test to make sure `hg evolve` don't solve troubles out of current stack: | |
19 ------------------------------------------------------------------------ | |
20 | |
21 $ hg init repo1 | |
22 $ cd repo1 | |
23 $ for ch in a b c; do | |
24 > echo $ch > $ch | |
25 > hg ci -Am "added "$ch --topic foo | |
26 > done; | |
27 adding a | |
28 active topic 'foo' grew its first changeset | |
29 (see 'hg help topics' for more information) | |
30 adding b | |
31 adding c | |
32 | |
33 $ echo d > d | |
34 $ hg ci -Am "added d" --topic bar | |
35 adding d | |
36 active topic 'bar' grew its first changeset | |
37 (see 'hg help topics' for more information) | |
38 | |
39 $ hg up -r "desc('added c')" | |
40 > echo cc >> c | |
41 switching to topic foo | |
42 0 files updated, 0 files merged, 1 files removed, 0 files unresolved | |
43 $ hg amend | |
44 1 new orphan changesets | |
45 | |
46 $ hg log -G | |
47 @ 4 - {foo} 0cc68cbf943a added c (draft) | |
48 | | |
49 | * 3 - {bar} 94b12ff0f44a added d (draft) | |
50 | | | |
51 | x 2 - {foo} 9c315cf1e7de added c (draft) | |
52 |/ | |
53 o 1 - {foo} ead01932caf0 added b (draft) | |
54 | | |
55 o 0 - {foo} 853c9ec0849e added a (draft) | |
56 | |
57 | |
58 $ hg stack | |
59 ### topic: foo | |
60 ### target: default (branch) | |
61 s3@ added c (current) | |
62 s2: added b | |
63 s1: added a | |
64 | |
65 As expected, evolve should deny to evolve here as there is no troubled csets in current stack: | |
66 $ hg evolve --all | |
67 nothing to evolve on current working copy parent | |
68 (1 other orphan in the repository, do you want --any or --rev) | |
69 [2] |