#!/bin/bash set -e # stg-mdiff - display meta-diffs, ie. diffs of diffs # Main use: show evolutions of a patch. # eg. stg-mdiff foo@stable foo # stg-mdiff foo 012345567ABCD # sha1 for "foo" as integrated upstream # Copyright (c) 2007 Yann Dirson # Subject to the GNU GPL, version 2. usage() { echo "Usage: $(basename $0) ..[]| ..[]|" exit 1 } if [ "$#" != 2 ]; then usage fi case "$1" in *..*) cmd1="stg diff" ;; *) cmd1="stg show" ;; esac case "$2" in *..*) cmd2="stg diff" ;; *) cmd2="stg show" ;; esac colordiff -u <($cmd1 "$1") <($cmd2 "$2") | less -RFX