Browse Source

doc&tools: Add murge script, for analyzing 3 way conflicts.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n3.2
Michael Niedermayer 8 years ago
parent
commit
360d3f3c18
2 changed files with 15 additions and 0 deletions
  1. +4
    -0
      doc/libav-merge.txt
  2. +11
    -0
      tools/murge

+ 4
- 0
doc/libav-merge.txt View File

@@ -103,6 +103,10 @@ It has two modes: merge, and noop. The noop mode creates a merge with no change
to the HEAD. You can pass a hash as extra argument to reference a justification to the HEAD. You can pass a hash as extra argument to reference a justification
(it is common that we already have the change done in FFmpeg). (it is common that we already have the change done in FFmpeg).


Also see tools/murge, you can copy and paste a 3 way conflict into its stdin
and it will display colored diffs. Any arguments to murge (like ones to suppress
whitespace differences) are passed into colordiff.

TODO/FIXME/UNMERGED TODO/FIXME/UNMERGED
=================== ===================




+ 11
- 0
tools/murge View File

@@ -0,0 +1,11 @@
#!/bin/sh

grep -A99999 '^<<<<<<<' | grep -B99999 '^>>>>>>>' >murge.X
grep -A99999 '^====' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.theirs
grep -B99999 '^||||' murge.X | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.ours
grep -B99999 '^====' murge.X | grep -A99999 '^||||' | egrep -v '^(=======|<<<<<<<|>>>>>>>|\|\|\|\|\|\|\|)' >murge.common

colordiff -du $* murge.ours murge.theirs
grep . murge.common > /dev/null && colordiff -du $* murge.common murge.theirs
grep . murge.common > /dev/null && colordiff -du $* murge.common murge.ours
rm murge.theirs murge.common murge.ours murge.X

Loading…
Cancel
Save