contrib/plan9/9mail
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Sat, 02 Aug 2014 21:46:26 +0900
changeset 21999 6ce282ed801e
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
cmdutil: introduce 'editform' to distinguish the purpose of commit text editing This information will be used to switch '[committemplate] changeset' definition according to its purpose in the subsequent patch. This information also makes it easier to hook commit text editing only in the specific cases.

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