354 # i18n: "lfs" is a keyword |
354 # i18n: "lfs" is a keyword |
355 fileset.getargs(x, 0, 0, _("lfs takes no arguments")) |
355 fileset.getargs(x, 0, 0, _("lfs takes no arguments")) |
356 return [f for f in mctx.subset |
356 return [f for f in mctx.subset |
357 if wrapper.pointerfromctx(mctx.ctx, f, removed=True) is not None] |
357 if wrapper.pointerfromctx(mctx.ctx, f, removed=True) is not None] |
358 |
358 |
359 @templatekeyword('lfs_files', requires={'ctx', 'templ'}) |
359 @templatekeyword('lfs_files', requires={'ctx'}) |
360 def lfsfiles(context, mapping): |
360 def lfsfiles(context, mapping): |
361 """List of strings. All files modified, added, or removed by this |
361 """List of strings. All files modified, added, or removed by this |
362 changeset.""" |
362 changeset.""" |
363 ctx = context.resource(mapping, 'ctx') |
363 ctx = context.resource(mapping, 'ctx') |
364 templ = context.resource(mapping, 'templ') |
|
365 |
364 |
366 pointers = wrapper.pointersfromctx(ctx, removed=True) # {path: pointer} |
365 pointers = wrapper.pointersfromctx(ctx, removed=True) # {path: pointer} |
367 files = sorted(pointers.keys()) |
366 files = sorted(pointers.keys()) |
368 |
367 |
369 def pointer(v): |
368 def pointer(v): |
377 'lfsoid': pointers[v].oid() if pointers[v] else None, |
376 'lfsoid': pointers[v].oid() if pointers[v] else None, |
378 'lfspointer': templateutil.hybriddict(pointer(v)), |
377 'lfspointer': templateutil.hybriddict(pointer(v)), |
379 } |
378 } |
380 |
379 |
381 # TODO: make the separator ', '? |
380 # TODO: make the separator ', '? |
382 f = templateutil._showlist('lfs_file', files, templ, mapping) |
381 f = templateutil._showcompatlist(context, mapping, 'lfs_file', files) |
383 return templateutil.hybrid(f, files, makemap, pycompat.identity) |
382 return templateutil.hybrid(f, files, makemap, pycompat.identity) |
384 |
383 |
385 @command('debuglfsupload', |
384 @command('debuglfsupload', |
386 [('r', 'rev', [], _('upload large files introduced by REV'))]) |
385 [('r', 'rev', [], _('upload large files introduced by REV'))]) |
387 def debuglfsupload(ui, repo, **opts): |
386 def debuglfsupload(ui, repo, **opts): |