[PATCH 4 of 8] blackbox: log working directory version

Yuya Nishihara yuya at tcha.org
Fri Feb 26 08:42:16 EST 2016


On Wed, 24 Feb 2016 14:10:48 -0600, timeless wrote:
> # HG changeset patch
> # User timeless <timeless at mozdev.org>
> # Date 1455045366 0
> #      Tue Feb 09 19:16:06 2016 +0000
> # Node ID f2cba1976f189c3b83c16da58925e88826662bcf
> # Parent  87cd8397e08cc7f5e225d823002b8056b252fa32
> blackbox: log working directory version

> +def hexfn(node):
> +    if node is None:
> +        return None
> +    else:
> +        return hex(node)

> +                if util.safehasattr(self, '_bbrepo'):
> +                    ctx = self._bbrepo[None]
> +                    if ctx.rev() is not None:
> +                        rev = hexfn(ctx.node())
> +                    else:
> +                        parents = ctx.parents()
> +                        rev = ('+'.join([hexfn(p.node()) for p in parents]))

It seems ctx.rev() is always None, and p.node() never be None.


More information about the Mercurial-devel mailing list