contrib/plan9/9mail
author Gregory Szorc <gregory.szorc@gmail.com>
Wed, 31 Jan 2018 16:43:46 -0800
changeset 35985 e69e65b2b4a9
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
hgweb: move call to protocol handler outside of try..except The protocol handler doesn't raise ErrorResponse. So it doesn't need to be in this `try..except ErrorResponse` block. Differential Revision: https://phab.mercurial-scm.org/D2020

#!/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