annotate tests/testlib/content-divergence-util.sh @ 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 3216855846dd
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5388
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
1 #!/bin/sh
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
2 # setup config and various utility to test content-divergence resolution
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
3
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
4 . $TESTDIR/testlib/common.sh
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
5
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
6 cat >> $HGRCPATH <<EOF
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
7 [ui]
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
8 # simpler log output
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
9 logtemplate ="{rev}:{node|short} ({phase}): {desc|firstline} {if(troubles, '[{troubles}]')}\n"
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
10
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
11 [phases]
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
12 # non publishing server
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
13 publish=False
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
14
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
15 [extensions]
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
16 evolve=
5390
3216855846dd evolve: add test coverage for content-div case A2
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 5388
diff changeset
17 rebase=
5388
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
18 EOF
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
19
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
20 setuprepos() {
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
21 echo creating test repo for test case $1
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
22 mkdir $1
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
23 cd $1
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
24
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
25 echo - upstream
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
26 hg init upstream
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
27 cd upstream
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
28 mkcommit O
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
29 hg phase --public .
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
30 cd ..
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
31 echo - local
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
32 hg clone -q upstream local
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
33 echo - other
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
34 hg clone -q upstream other
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
35 echo 'cd into `local` and proceed with env setup'
af210e6293c5 evolve: add setup utility for testing content-divergence resolution
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
36 }