comparison tests/test-rename-dir-merge.t @ 23464:73d4f6551798

merge: add test with conflicting file and remote directory rename Changset 88629daa727b (merge: demonstrate that directory renames can lose local file content, 2014-12-02) should clearly have added the reverse version of the test: where the remote side renamed a directory, added a new file in that directory, and the local directory added a conflicting file in the source directory. Add such a test now, and also touch up the ones already added slightly (e.g. 'local' was a stupid value for content that can be on either side of a merge).
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 03 Dec 2014 10:01:24 -0800
parents 88629daa727b
children 67f1d68861fb
comparison
equal deleted inserted replaced
23463:bb0143e12f35 23464:73d4f6551798
109 and untracked in local target directory. 109 and untracked in local target directory.
110 110
111 BROKEN: the uncommitted file is overwritten; we should abort 111 BROKEN: the uncommitted file is overwritten; we should abort
112 112
113 $ hg co -qC 1 113 $ hg co -qC 1
114 $ echo local > b/c 114 $ echo target > b/c
115 $ hg merge 2 115 $ hg merge 2
116 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 116 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
117 (branch merge, don't forget to commit) 117 (branch merge, don't forget to commit)
118 $ hg st -C 118 $ hg st -A
119 A b/c 119 A b/c
120 a/c 120 a/c
121 ? a/d 121 ? a/d
122 C b/a
123 C b/b
122 $ cat b/c 124 $ cat b/c
123 baz 125 baz
124 126
125 Local directory rename with conflicting file added in remote source directory 127 Local directory rename with conflicting file added in remote source directory
126 and committed in local target directory. 128 and committed in local target directory.
127 129
128 BROKEN: the local file is overwritten; it should be merged 130 BROKEN: the local file is overwritten; it should be merged
129 131
130 $ hg co -qC 1 132 $ hg co -qC 1
131 $ echo local > b/c 133 $ echo target > b/c
132 $ hg add b/c 134 $ hg add b/c
133 $ hg commit -qm 'new file in target directory' 135 $ hg commit -qm 'new file in target directory'
134 $ hg merge 2 136 $ hg merge 2
135 1 files updated, 0 files merged, 0 files removed, 0 files unresolved 137 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
136 (branch merge, don't forget to commit) 138 (branch merge, don't forget to commit)
137 $ hg st -C 139 $ hg st -A
138 A b/c 140 A b/c
139 a/c 141 a/c
142 ? a/d
143 C b/a
144 C b/b
145 $ cat b/c
146 baz
147
148 Remote directory rename with conflicting file added in remote target directory
149 and committed in local source directory.
150
151 BROKEN: the remote is ignored; it should be merged
152
153 $ hg co -qC 2
154 $ rm b/c
155 $ hg st -A
156 ? a/d
157 C a/a
158 C a/b
159 C a/c
160 $ hg merge 5
161 3 files updated, 0 files merged, 2 files removed, 0 files unresolved
162 (branch merge, don't forget to commit)
163 $ hg st -A
164 M b/a
165 M b/b
166 A b/c
167 a/c
168 R a/a
169 R a/b
170 R a/c
140 ? a/d 171 ? a/d
141 $ cat b/c 172 $ cat b/c
142 baz 173 baz
143 174
144 Second scenario with two repos: 175 Second scenario with two repos: