[PATCH V2] merge: add `internal:dumpjson` tool to `resolve`, which outputs conflict state

Kevin Bullock kbullock+mercurial at ringworld.org
Wed Mar 15 23:08:13 EDT 2017


> On Mar 15, 2017, at 12:48, Durham Goode <durham at fb.com> wrote:
> 
> 
> 
> On 3/7/17 11:40 AM, Phil Cohen wrote:
>> # HG changeset patch
>> # User Phil Cohen <phillco at fb.com>
>> # Date 1488915535 28800
>> #      Tue Mar 07 11:38:55 2017 -0800
>> # Node ID bbce62e3790220f19e7b37160a2f8351b7461272
>> # Parent  91e86a6c61c0c6a3b554eefeba9060000311aa29
>> merge: add `internal:dumpjson` tool to `resolve`, which outputs conflict state
>> 
>> This supersedes a previous change which added a --prep option.
> 
> Generally we don't reference previous iterations of the patch in the commit message, since those previous iterations wont' show up in the repo after this is pushed.
> 
>> Normally, `hg resolve` takes the user on a whistle-stop tour of each conflicted
>> file, pausing to launch the editor to resolve the conflicts. This is an
>> alternative workflow for resolving many conflicts in a random-access fashion. It
>> doesn't change/replace the default behavior.
>> 
>> This commit adds `--tool=internal:dumpjson`. It prints, for each conflict, the
>> "base", "other", and "ours" versions (the contents, as well as their exec/link
>> flags), and where the user/tool should write a resolved version (i.e., the
>> working copy) as JSON. The user will then resolve the conflicts at their leisure
>> and run `hg resolve --mark`.
> 
> Overall I think it looks good.  Some minor comments inline, but I'd be ok having this queued (since it's been sitting here a while) and addressing the nits in a follow up.

Thanks for reviewing, Durham. This all looks like reasonably simple cleanup--Phil, do you mind preparing a V3?

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list