Mercurial > evolve
comparison tests/test-evolve-content-divergence.t @ 3802:4bad80f1aad3
evolve: pop up editor if conflicts occur while merging commit messages
Last patch added support for merging commit messages while resolving content
divergence. In case of conflicts we fallback to one of the divergent commit
messages.
After this patch, we will pop up an editor where user has to resolve the
conflicts in the commit messages and then continue.
Tests are added for this. We need to fix handling in test-sharing.t to use
HGEDITOR to fix conflicts and pass the new commit message.
Future improvement can be that we should respect HGMERGE while merging commit
descriptions too.
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Wed, 06 Jun 2018 03:26:47 +0530 |
parents | ee78135b2f45 |
children | 509b1e66f0b9 |
comparison
equal
deleted
inserted
replaced
3801:ee78135b2f45 | 3802:4bad80f1aad3 |
---|---|
239 | 239 |
240 $ echo watbar > d | 240 $ echo watbar > d |
241 $ hg resolve -m | 241 $ hg resolve -m |
242 (no more unresolved files) | 242 (no more unresolved files) |
243 continue: hg evolve --continue | 243 continue: hg evolve --continue |
244 $ hg evolve --continue | 244 |
245 conflicts while merging descriptions, using description of divergent changeset | 245 $ cat > editor.sh <<EOF |
246 working directory is now at 578f12701e5a | 246 > #!/bin/sh |
247 | 247 > printf "**showing editors text**\n\n" |
248 $ hg glog | 248 > cat \$1 |
249 @ 16:578f12701e5a wat to d, wat? | 249 > printf "\n**done showing editors text**\n\n" |
250 | () [default] draft | 250 > cat > \$1 <<ENDOF |
251 o 3:ca1b80f7960a added c | 251 > watbar to d |
252 | () [default] draft | 252 > ENDOF |
253 o 2:b1661037fa25 added b | 253 > EOF |
254 | () [default] draft | 254 |
255 o 1:c7586e2a9264 added a | 255 $ HGEDITOR='sh ./editor.sh' hg evolve --continue |
256 | () [default] draft | 256 **showing editors text** |
257 o 0:8fa14d15e168 added hgignore | 257 |
258 () [default] draft | 258 HG: Conflicts while merging changeset description of content-divergent changesets. |
259 HG: Resolve conflicts in commit messages to continue. | |
260 | |
261 <<<<<<< divergent | |
262 wat to d, wat?||||||| base | |
263 foo to d======= | |
264 bar to d, expect beers>>>>>>> other | |
265 | |
266 **done showing editors text** | |
267 | |
268 working directory is now at 00f8d08aea43 | |
269 | |
270 $ hg glog | |
271 @ 16:00f8d08aea43 watbar to d | |
272 | () [default] draft | |
273 o 3:ca1b80f7960a added c | |
274 | () [default] draft | |
275 o 2:b1661037fa25 added b | |
276 | () [default] draft | |
277 o 1:c7586e2a9264 added a | |
278 | () [default] draft | |
279 o 0:8fa14d15e168 added hgignore | |
280 () [default] draft |