contrib/plan9/9mail
author Denis Laxalde <denis.laxalde@logilab.fr>
Thu, 05 Oct 2017 21:20:08 +0200
changeset 34855 35c6a54ec1ff
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
diff: also yield file context objects in patch.trydiff() (API) And retrieve them in patch.diffhunks(). We'll use these in forthcoming changesets to filter diff hunks by line range.

#!/bin/rc
# 9mail - Mercurial email wrapper for upas/marshal

fn usage {
	echo >[1=2] usage: mercurial/9mail -f from to [cc]
	exit usage
}

from=()
cc=()
to=()

switch($1){
case -f
	from=$2
case *
	usage
}

to=($3)
if(~ $#* 4)
	cc=(-C $4)

upasname=$from
upas/marshal $cc $to