Mercurial > evolve
annotate tests/test-topic-multiple.t @ 6850:6d22e9a596c4
topic: compatibility for revbranchcache being in a separate module now
The newer revbranchcache defaults to v2, so the name of the cache file is
different. Let's glob and hide it, since its actual contents look the same (at
least for the moment).
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 28 Sep 2024 16:09:03 +0400 |
parents | f394b41fcbc7 |
children | 9da0114a8a02 |
rev | line source |
---|---|
4630
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
1 Testing topics on cases when we have multiple topics based on top |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
2 of other. |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
3 $ . "$TESTDIR/testlib/topic_setup.sh" |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
4 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
5 Setup |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
6 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
7 $ cat << EOF >> $HGRCPATH |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
8 > [experimental] |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
9 > evolution = all |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
10 > [ui] |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
11 > interactive = True |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
12 > logtemplate = {rev} - \{{get(namespaces, "topics")}} {node|short} {desc} ({phase})\n |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
13 > [extensions] |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
14 > show = |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
15 > EOF |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
16 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
17 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
18 Test to make sure `hg evolve` don't solve troubles out of current stack: |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
19 ------------------------------------------------------------------------ |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
20 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
21 $ hg init repo1 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
22 $ cd repo1 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
23 $ for ch in a b c; do |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
24 > echo $ch > $ch |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
25 > hg ci -Am "added "$ch --topic foo |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
26 > done; |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
27 adding a |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
28 active topic 'foo' grew its first changeset |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
29 (see 'hg help topics' for more information) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
30 adding b |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
31 adding c |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
32 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
33 $ echo d > d |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
34 $ hg ci -Am "added d" --topic bar |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
35 adding d |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
36 active topic 'bar' grew its first changeset |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
37 (see 'hg help topics' for more information) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
38 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
39 $ hg up -r "desc('added c')" |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
40 > echo cc >> c |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
41 switching to topic foo |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
42 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
43 $ hg amend |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
44 1 new orphan changesets |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
45 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
46 $ hg log -G |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
47 @ 4 - {foo} 0cc68cbf943a added c (draft) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
48 | |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
49 | * 3 - {bar} 94b12ff0f44a added d (draft) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
50 | | |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
51 | x 2 - {foo} 9c315cf1e7de added c (draft) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
52 |/ |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
53 o 1 - {foo} ead01932caf0 added b (draft) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
54 | |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
55 o 0 - {foo} 853c9ec0849e added a (draft) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
56 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
57 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
58 $ hg stack |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
59 ### topic: foo |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
60 ### target: default (branch) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
61 s3@ added c (current) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
62 s2: added b |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
63 s1: added a |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
64 |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
65 As expected, evolve should deny to evolve here as there is no troubled csets in current stack: |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
66 $ hg evolve --all |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
67 nothing to evolve on current working copy parent |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
68 (1 other orphan in the repository, do you want --any or --rev) |
f394b41fcbc7
topic: add test to increase code coverage in case of multiple topics
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff
changeset
|
69 [2] |