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