version control - How can I see diffs of all of the conflicts in a mercurial (or git) merge? -


this question asks how see files have conflicts in merge. i'd able see listings of diffs of conflicts (as opposed diffs in merge went through cleanly.)

for instance, make possible dispense conflicts "noise" resolving --tool :other --tool :local or --tool :union without bringing merge editor.

i think answers (i'm formulating 1 right now) analogous small differences git , mercurial, i'll risk leaving question vc-agnostic.

in mercurial if merge or resolve :merge3 tool, leave markers in files conflicts. fileset unresolved() contains files conflicts. using perl print filenames , unresolved sections (ignoring cleanly merged sections):

hg merge --tool :merge3 <branchtomerge> hg diff 'set:unresolved()' | perl -ne 'print if m|^\+\+\+ | or m|<<<+ local$| .. m|>>>+ other$|' 

Comments