From patchwork Thu Aug 18 16:45:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 212 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.140.134 with SMTP id o128csp447319vsd; Thu, 18 Aug 2016 10:10:43 -0700 (PDT) X-Received: by 10.28.46.204 with SMTP id u195mr428363wmu.57.1471540243205; Thu, 18 Aug 2016 10:10:43 -0700 (PDT) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id jy1si280168wjc.74.2016.08.18.10.10.41; Thu, 18 Aug 2016 10:10:43 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A86EE689CE5; Thu, 18 Aug 2016 20:10:39 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-dmta-pe03-2.mx.upcmail.net (unknown [62.179.121.161]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id ED53D689ECF for ; Thu, 18 Aug 2016 19:48:45 +0300 (EEST) Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe03.mx.upcmail.net with esmtp (Exim 4.87) (envelope-from ) id 1baQUd-0001uZ-LU for ffmpeg-devel@ffmpeg.org; Thu, 18 Aug 2016 18:48:35 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id Ygoa1t00B0S5wYM01gobyN; Thu, 18 Aug 2016 18:48:35 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Thu, 18 Aug 2016 18:45:23 +0200 Message-Id: <20160818164523.3193-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.9.3 Subject: [FFmpeg-devel] [PATCH] doc&tools: Add murge script, for analyzing 3 way conflicts. X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" TODO: tempfiles Signed-off-by: Michael Niedermayer --- doc/libav-merge.txt | 4 ++++ tools/murge | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 tools/murge 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..1983fed --- /dev/null +++ b/tools/murge @@ -0,0 +1,13 @@ +#!/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 + +