[PATCH 5 of 8] wireproto: add known([id]) function

Benoit Boissinot bboissin at gmail.com
Tue Mar 22 15:36:07 CDT 2011


On Tue, Mar 22, 2011 at 04:27:33PM +0100, Peter Arrenbrecht wrote:
> # HG changeset patch
> # User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
> # Date 1300782141 -3600
> wireproto: add known([id]) function
> 
>   known([Node]) -> [1/0]
> 
> +    def known(self, nodes):
> +        n = encodelist(nodes)
> +        d = self._call("known", nodes=n)
> +        try:
> +            return [bool(int(f)) for f in d]
> +        except:
> +            self._abort(error.ResponseError(_("unexpected response:"), d))

I think we can tighten the except to ValueError.

regards,

Benoit
-- 
:wq


More information about the Mercurial-devel mailing list