contrib/plan9/9mail
author Pierre-Yves David <pierre-yves.david@fb.com>
Tue, 16 Sep 2014 23:47:34 -0700
changeset 22483 a21d04848359
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
revset: simplify orderedlazyset creation in spanset method We can simply use the `self.isascending` value instead of more complex if/else clause. This get the code simpler. Benchmarks show no performances harmed in the process.

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