view contrib/plan9/9mail @ 34789:1ddc2547749f

test-dispatch: make the test compatible with chg The test is broken when run with chg because it prints a different error message when chg is running. This commit fixes the test by special casing for chg. Test Plan: Ran the test 'test-dispatch.t' with and without '--chg' option. Differential Revision: https://phab.mercurial-scm.org/D1126
author Saurabh Singh <singhsrb@fb.com>
date Mon, 16 Oct 2017 17:14:21 -0700
parents 4bfd3c7160d9
children
line wrap: on
line source

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