Mercurial > hg
view contrib/plan9/9mail @ 37860:a91f31a1e281
revlog: extract function for getting node from known-to-exist rev
Many of the calls to index_node() (which converts a rev to a nodeid)
are done with a rev that's know to exist. If the function fails,
there's something really wrong and we should just abort. This was done
in only one place. This patch starts by extracting that code to a
function that we can reuse in later patches.
Differential Revision: https://phab.mercurial-scm.org/D3456
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 04 May 2018 21:58:43 -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