This looks good to me.

On 13/03/2017 12:00, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <au...@google.com>
> # Date 1489431594 14400
> #      Mon Mar 13 14:59:54 2017 -0400
> # Node ID 7d290452e8f119b1329f70c9d529a8c5ff271cea
> # Parent  dd7bb6e663c80553a6abb197bbe74de439c4410f
> datapack: don't depend on demandimport when cstore isn't available
>
> We've got a goofy test binary that doesn't use demandimport, and this
> was tripping it up.
>
> diff --git a/remotefilelog/datapack.py b/remotefilelog/datapack.py
> --- a/remotefilelog/datapack.py
> +++ b/remotefilelog/datapack.py
> @@ -3,7 +3,11 @@ from mercurial import util
>   from mercurial.node import nullid, hex
>   from mercurial.i18n import _
>   import basepack, constants
> -import cstore
> +try:
> +    import cstore
> +    cstore.datapack
> +except ImportError:
> +    cstore = None
>   
>   # Index entry format is: <node><delta offset><pack data offset><pack data 
> size>
>   # See the mutabledatapack doccomment for more details.
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to