annotate tests/test-evolve-content-divergent-meta.t @ 4562:d96016b46283 mercurial-4.4

test-compat: merge mercurial-4.5 into mercurial-4.4
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Tue, 23 Apr 2019 12:29:50 +0200
parents aafd51f145ea
children 79bc0f1a832e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4482
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
1 +====================================================
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
2 +Tests the resolution of content divergence: metadata
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
3 +====================================================
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
4
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
5 This file intend to cover cases focused around meta data merging.
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
6
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
7 Setup
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
8 -----
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
9
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
10 $ cat >> $HGRCPATH <<EOF
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
11 > [alias]
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
12 > glog = log -GT "{rev}:{node|short} {desc|firstline}\n {phase} {troubles}\n\n"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
13 > [phases]
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
14 > publish = False
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
15 > [extensions]
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
16 > rebase =
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
17 > EOF
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
18 $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext3rd/evolve/" >> $HGRCPATH
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
19
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
20 Check we preserve the author properly
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
21 -------------------------------------
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
22
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
23 Testing issue6113 to make sure that content-divergence resolution don't
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
24 replace initial author with the user running the resolution command:
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
25
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
26 $ hg init userfoo
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
27 $ cd userfoo
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
28 $ unset HGUSER
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
29 $ echo "[ui]" >> ./.hg/hgrc
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
30 $ echo "username = foo <foo@test.com>" >> ./.hg/hgrc
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
31 $ for ch in a b c; do
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
32 > echo $ch > $ch;
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
33 > hg add $ch;
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
34 > hg ci -m "added "$ch;
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
35 > done;
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
36
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
37 $ cd ..
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
38 $ hg init userbar
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
39 $ cd userbar
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
40 $ unset HGUSER
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
41 $ echo "[ui]" >> ./.hg/hgrc
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
42 $ echo "username = bar <bar@test.com>" >> ./.hg/hgrc
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
43 $ hg pull ./../userfoo -q
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
44
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
45 $ cd ../userfoo
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
46 $ hg up -r "desc('added b')"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
47 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
48 $ echo c > c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
49 $ echo e > e
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
50 $ hg add c e
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
51 $ hg ci -m "added c e"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
52 created new head
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
53
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
54 $ hg up -r "desc('added b')"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
55 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
56 $ echo cc > c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
57 $ hg add c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
58 $ hg ci -m "added c"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
59 created new head
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
60
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
61 $ hg prune -r "min(desc('added c'))" -s "desc('added c e')"
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
62 1 changesets pruned
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
63 $ hg prune -r "min(desc('added c'))" -s "max(desc('added c'))" --hidden
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
64 1 changesets pruned
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
65
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
66 $ hg glog
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
67 @ 4:6c06cda6dc99 added c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
68 | draft content-divergent
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
69 |
4553
aafd51f145ea test-compat: adapt test output to 4.4
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 4496
diff changeset
70 | o 3:0c9267e23c9d added c e
4482
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
71 |/ draft content-divergent
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
72 |
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
73 o 1:1740ad2a1eda added b
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
74 | draft
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
75 |
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
76 o 0:f863f39764c4 added a
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
77 draft
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
78
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
79
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
80 $ cd ../userbar
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
81 $ hg pull ./../userfoo -q
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
82
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
83 $ hg evolve --content-divergent --any
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
84 merge:[3] added c e
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
85 with: [4] added c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
86 base: [2] added c
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
87 updating to "local" side of the conflict: 0c9267e23c9d
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
88 merging "other" content-divergent changeset '6c06cda6dc99'
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
4483
7978230faa32 evolve: make sure div resolution don't replace the initial author (issue6113)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4482
diff changeset
90 working directory is now at 443bd2972210
4482
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
91
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
92 Make sure resultant cset don't replace the initial user with user running the command:
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
93 $ hg log -r tip
4483
7978230faa32 evolve: make sure div resolution don't replace the initial author (issue6113)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4482
diff changeset
94 changeset: 5:443bd2972210
4482
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
95 tag: tip
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
96 parent: 1:1740ad2a1eda
4483
7978230faa32 evolve: make sure div resolution don't replace the initial author (issue6113)
Sushil khanchi <sushilkhanchi97@gmail.com>
parents: 4482
diff changeset
97 user: foo <foo@test.com>
4482
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
98 date: Thu Jan 01 00:00:00 1970 +0000
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
99 summary: added c e
ee7e4e05ce44 evolve: add test which demonstrate issue6113
Sushil khanchi <sushilkhanchi97@gmail.com>
parents:
diff changeset
100