annotate tests/test-evolve-extras.t @ 6773:bdc27aff5ac3 stable

Added tag 11.1.3 for changeset 2d2da4f7742a
author Anton Shestakov <av6@dwimlabs.net>
date Fri, 12 Apr 2024 15:44:32 -0300
parents e36883d88108
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6493
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
1 Testing retained_extras_on_rebase usage in evolve and modifying it in an extension
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
2
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
3 $ . $TESTDIR/testlib/common.sh
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
4
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
5 $ hg init repo
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
6 $ cd repo
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
7 $ cat > .hg/hgrc << EOF
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
8 > [extensions]
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
9 > evolve =
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
10 > EOF
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
11
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
12 $ echo apple > a
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
13 $ hg ci -qAm 'apple'
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
14 $ echo banana > b
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
15 $ hg ci -qAm 'banana' --config extensions.commitextras= \
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
16 > --extra useful=b-for-banana \
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
17 > --extra useless=banana-peel
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
18
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
19 amending apple
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
20
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
21 $ hg prev
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
22 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
23 [0] apple
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
24 $ echo apricot > a
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
25 $ hg amend -m 'apricot'
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
26 1 new orphan changesets
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
27
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
28 the commit still has all extras that we added previously
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
29
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
30 $ hg log -r 'desc("banana")' -T '{join(extras, " ")}\n'
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
31 *useful=b-for-banana*useless=banana-peel* (glob)
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
32
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
33 let's run evolve with our extension
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
34
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
35 $ hg --config extensions.retained_extras=${TESTDIR}/testlib/retain-extras-ext.py evolve
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
36 move:[1] banana
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
37 atop:[2] apricot
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
38
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
39 evolving banana retained "useful" and discarded "useless"
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
40
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
41 $ hg log -r 'desc("banana")' -T '{join(extras, " ")}\n'
e36883d88108 evolve: add a test to capture the expected behavior of retaining extras
Jason R. Coombs <jaraco@jaraco.com>
parents:
diff changeset
42 *useful=b-for-banana* (glob)