annotate tests/test-topic-multiple.t @ 6889:a66cf9008781

obslog: also display patch for rebased changesets This applies the same logic that is used for "merge-diff" to rebased changesets. The successors' content is compared to the content of the predecessors rebased in-memory on the new parents. This highlights the changes that were actually introduced while rebasing (like conflict resolution or API adjustment). As a side effect, obslog now also outputs slightly more diffs for splits, showing what parts of the original big changeset were moved to the smaller split components (but for now it only works for the first few changesets).
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Sun, 22 Sep 2024 02:58:54 +0200
parents 9da0114a8a02
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
6879
9da0114a8a02 topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents: 4630
diff changeset
28 active topic '//foo' grew its first changeset
4630
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
6879
9da0114a8a02 topic: use FQBN for displaying topic name when it grows its first changeset
Anton Shestakov <av6@dwimlabs.net>
parents: 4630
diff changeset
36 active topic '//bar' grew its first changeset
4630
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]