[PATCH 6 of 7 mergedriver] node: add 'nullhex', hex-encoded nullid
Martin von Zweigbergk
martinvonz at google.com
Mon Nov 16 23:09:15 CST 2015
This has been pushed to the clowncopter, thanks, but I'm dropping
patch 7/7 as we talked about.
On Mon, Nov 16, 2015 at 3:46 PM, Siddharth Agarwal <sid0 at fb.com> wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1447701812 28800
> # Mon Nov 16 11:23:32 2015 -0800
> # Node ID c56137c086886035f7798a28d901bd794def8680
> # Parent 91b518d4c3f5854f7443bf73467e5d0d83cec01f
> node: add 'nullhex', hex-encoded nullid
>
> We're going to need this for upcoming changes, because the merge state stores
> nodes as hex strings.
>
> diff --git a/mercurial/node.py b/mercurial/node.py
> --- a/mercurial/node.py
> +++ b/mercurial/node.py
> @@ -9,17 +9,18 @@ from __future__ import absolute_import
>
> import binascii
>
> +# This ugly style has a noticeable effect in manifest parsing
> +hex = binascii.hexlify
> +bin = binascii.unhexlify
> +
> nullrev = -1
> nullid = "\0" * 20
> +nullhex = hex(nullid)
>
> # pseudo identifiers for working directory
> # (they are experimental, so don't add too many dependencies on them)
> wdirrev = 0x7fffffff
> wdirid = "\xff" * 20
>
> -# This ugly style has a noticeable effect in manifest parsing
> -hex = binascii.hexlify
> -bin = binascii.unhexlify
> -
> def short(node):
> return hex(node[:6])
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list