[PATCH 1 of 5 RFC] lfs: convert '{lfs_files}' keyword to a hybrid list

Yuya Nishihara yuya at tcha.org
Mon Jan 15 14:53:54 UTC 2018


On Sun, 14 Jan 2018 23:58:48 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1515962350 18000
> #      Sun Jan 14 15:39:10 2018 -0500
> # Node ID 47840d8f396120e9fbfe74f874abd6b34725d807
> # Parent  3f5167faeb5d1f28939eaf2c2825bb65f67a2458
> lfs: convert '{lfs_files}' keyword to a hybrid list

Looks generally good. One nit.

Can you resend templater ones?

>  @templatekeyword('lfs_files')
>  def lfsfiles(repo, ctx, **args):
>      """List of strings. LFS files added or modified by the changeset."""
> +    args = pycompat.byteskwargs(args)
> +
>      pointers = wrapper.pointersfromctx(ctx) # {path: pointer}
> -    return sorted(pointers.keys())
> +    files = sorted(pointers.keys())
> +
> +    makemap = lambda v: {
> +        'lfs_file': v,

Nit: 'file' is preferred since file_adds/dels/mods names each element as such.



More information about the Mercurial-devel mailing list