##// END OF EJS Templates
tests: test renaming a file added on two branches (issue2089)...
Wagner Bruna -
r13492:ca940d06 stable
parent child Browse files
Show More
@@ -1,127 +1,157 b''
1 1 $ hg init
2 2
3 3 $ echo "[merge]" >> .hg/hgrc
4 4 $ echo "followcopies = 1" >> .hg/hgrc
5 5
6 6 $ echo foo > a
7 7 $ echo foo > a2
8 8 $ hg add a a2
9 9 $ hg ci -m "start"
10 10
11 11 $ hg mv a b
12 12 $ hg mv a2 b2
13 13 $ hg ci -m "rename"
14 14
15 15 $ hg co 0
16 16 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
17 17
18 18 $ echo blahblah > a
19 19 $ echo blahblah > a2
20 20 $ hg mv a2 c2
21 21 $ hg ci -m "modify"
22 22 created new head
23 23
24 24 $ hg merge -y --debug
25 25 searching for copies back to rev 1
26 26 unmatched files in local:
27 27 c2
28 28 unmatched files in other:
29 29 b
30 30 b2
31 31 all copies found (* = to merge, ! = divergent):
32 32 c2 -> a2 !
33 33 b -> a *
34 34 b2 -> a2 !
35 35 checking for directory renames
36 36 a2: divergent renames -> dr
37 37 resolving manifests
38 38 overwrite None partial False
39 39 ancestor af1939970a1c local 044f8520aeeb+ remote 85c198ef2f6c
40 40 a: remote moved to b -> m
41 41 b2: remote created -> g
42 42 preserving a for resolve of b
43 43 removing a
44 44 updating: a 1/3 files (33.33%)
45 45 picked tool 'internal:merge' for b (binary False symlink False)
46 46 merging a and b to b
47 47 my b@044f8520aeeb+ other b@85c198ef2f6c ancestor a@af1939970a1c
48 48 premerge successful
49 49 updating: a2 2/3 files (66.67%)
50 50 note: possible conflict - a2 was renamed multiple times to:
51 51 c2
52 52 b2
53 53 updating: b2 3/3 files (100.00%)
54 54 getting b2
55 55 1 files updated, 1 files merged, 0 files removed, 0 files unresolved
56 56 (branch merge, don't forget to commit)
57 57
58 58 $ hg status -AC
59 59 M b
60 60 a
61 61 M b2
62 62 R a
63 63 C c2
64 64
65 65 $ cat b
66 66 blahblah
67 67
68 68 $ hg ci -m "merge"
69 69
70 70 $ hg debugindex .hg/store/data/b.i
71 71 rev offset length base linkrev nodeid p1 p2
72 72 0 0 67 0 1 57eacc201a7f 000000000000 000000000000
73 73 1 67 72 1 3 4727ba907962 000000000000 57eacc201a7f
74 74
75 75 $ hg debugrename b
76 76 b renamed from a:dd03b83622e78778b403775d0d074b9ac7387a66
77 77
78 78 This used to trigger a "divergent renames" warning, despite no renames
79 79
80 80 $ hg cp b b3
81 81 $ hg cp b b4
82 82 $ hg ci -A -m 'copy b twice'
83 83 $ hg up eb92d88a9712
84 84 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
85 85 $ hg up
86 86 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 87 $ hg rm b3 b4
88 88 $ hg ci -m 'clean up a bit of our mess'
89 89
90 90 We'd rather not warn on divergent renames done in the same changeset (issue2113)
91 91
92 92 $ hg cp b b3
93 93 $ hg mv b b4
94 94 $ hg ci -A -m 'divergent renames in same changeset'
95 95 $ hg up c761c6948de0
96 96 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
97 97 $ hg up
98 98 note: possible conflict - b was renamed multiple times to:
99 99 b3
100 100 b4
101 101 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
102 102
103 103 Check for issue2642
104 104
105 105 $ hg init t
106 106 $ cd t
107 107
108 108 $ echo c0 > f1
109 109 $ hg ci -Aqm0
110 110
111 111 $ hg up null -q
112 112 $ echo c1 > f1 # backport
113 113 $ hg ci -Aqm1
114 114 $ hg mv f1 f2
115 115 $ hg ci -qm2
116 116
117 117 $ hg up 0 -q
118 118 $ hg merge 1 -q --tool internal:local
119 119 $ hg ci -qm3
120 120
121 121 $ hg merge 2
122 122 merging f1 and f2 to f2
123 123 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
124 124 (branch merge, don't forget to commit)
125 125
126 126 $ cat f2
127 127 c0
128
129 Check for issue2089
130
131 $ hg init repo2089
132 $ cd repo2089
133
134 $ echo 0 > A
135 $ hg -q ci -Am 0
136
137 $ hg -q up -C null
138 $ echo 1 > A
139 $ hg -q ci -Am 1
140
141 $ hg -q up -C 0
142 $ hg merge 1 -q --tool internal:local
143 $ echo 2 > A
144 $ hg -q ci -m 2
145
146 $ hg -q up -C 1
147 $ hg mv A a
148 $ hg -q ci -Am 3
149
150 $ hg -q up -C 2
151 $ hg merge 3
152 merging A and a to a
153 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
154 (branch merge, don't forget to commit)
155
156 $ cat a
157 2
General Comments 0
You need to be logged in to leave comments. Login now