[PATCH 1 of 3] lfs: add the '{pointer}' template keyword to '{lfs_files}'
Yuya Nishihara
yuya at tcha.org
Thu Jan 18 06:51:19 EST 2018
On Wed, 17 Jan 2018 22:08:35 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1515967224 18000
> # Sun Jan 14 17:00:24 2018 -0500
> # Node ID 5958f27453d90c24f443d698439c2a8cd39e70c2
> # Parent a62b08f6626bd0f838b2c77a2f1a48068852be1f
> lfs: add the '{pointer}' template keyword to '{lfs_files}'
>
> This provides access to the metadata dictionary contained within the tracked
> pointer file. The OID is probably the most important attribute, and has its own
> keyword. But we might as well have this for completeness.
>
> diff --git a/hgext/lfs/__init__.py b/hgext/lfs/__init__.py
> --- a/hgext/lfs/__init__.py
> +++ b/hgext/lfs/__init__.py
> @@ -314,6 +314,7 @@
> makemap = lambda v: {
> 'file': v,
> 'oid': pointers[v].oid(),
> + 'pointer': pointers[v],
Better to wrap it by templatekw.hybriddict() because a dict of dicts isn't
a valid template structure.
More information about the Mercurial-devel
mailing list