[FFmpeg-cvslog] doc&tools: Add murge script, for analyzing 3 way conflicts.

Michael Niedermayer git at videolan.org
Mon Aug 22 19:58:09 EEST 2016


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Thu Aug 18 18:45:23 2016 +0200| [360d3f3c187fa81ba583fd5a74704b09872937a6] | committer: Michael Niedermayer

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

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=360d3f3c187fa81ba583fd5a74704b09872937a6
---

 doc/libav-merge.txt |  4 ++++
 tools/murge         | 11 +++++++++++
 2 files changed, 15 insertions(+)

diff --git a/doc/libav-merge.txt b/doc/libav-merge.txt
index 60c953a..4b2bb76 100644
--- a/doc/libav-merge.txt
+++ b/doc/libav-merge.txt
@@ -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
 (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
 ===================
 
diff --git a/tools/murge b/tools/murge
new file mode 100755
index 0000000..f22fcfd
--- /dev/null
+++ b/tools/murge
@@ -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



More information about the ffmpeg-cvslog mailing list