hgext/lfs/__init__.py
changeset 35657 8580e5898cb7
parent 35618 c780e0649e41
child 35658 a1222a8cc93b
equal deleted inserted replaced
35656:c9eb92fb87b7 35657:8580e5898cb7
    59     fileset,
    59     fileset,
    60     hg,
    60     hg,
    61     localrepo,
    61     localrepo,
    62     minifileset,
    62     minifileset,
    63     node,
    63     node,
       
    64     pycompat,
    64     registrar,
    65     registrar,
    65     revlog,
    66     revlog,
    66     scmutil,
    67     scmutil,
       
    68     templatekw,
    67     upgrade,
    69     upgrade,
    68     vfs as vfsmod,
    70     vfs as vfsmod,
    69     wireproto,
    71     wireproto,
    70 )
    72 )
    71 
    73 
   219     wrapfunction(bundle2, 'writenewbundle', wrapper.writenewbundle)
   221     wrapfunction(bundle2, 'writenewbundle', wrapper.writenewbundle)
   220 
   222 
   221 @templatekeyword('lfs_files')
   223 @templatekeyword('lfs_files')
   222 def lfsfiles(repo, ctx, **args):
   224 def lfsfiles(repo, ctx, **args):
   223     """List of strings. LFS files added or modified by the changeset."""
   225     """List of strings. LFS files added or modified by the changeset."""
       
   226     args = pycompat.byteskwargs(args)
       
   227 
   224     pointers = wrapper.pointersfromctx(ctx) # {path: pointer}
   228     pointers = wrapper.pointersfromctx(ctx) # {path: pointer}
   225     return sorted(pointers.keys())
   229     files = sorted(pointers.keys())
       
   230 
       
   231     makemap = lambda v: {
       
   232         'file': v,
       
   233     }
       
   234 
       
   235     # TODO: make the separator ', '?
       
   236     f = templatekw._showlist('lfs_file', files, args)
       
   237     return templatekw._hybrid(f, files, makemap, pycompat.identity)
   226 
   238 
   227 @command('debuglfsupload',
   239 @command('debuglfsupload',
   228          [('r', 'rev', [], _('upload large files introduced by REV'))])
   240          [('r', 'rev', [], _('upload large files introduced by REV'))])
   229 def debuglfsupload(ui, repo, **opts):
   241 def debuglfsupload(ui, repo, **opts):
   230     """upload lfs blobs added by the working copy parent or given revisions"""
   242     """upload lfs blobs added by the working copy parent or given revisions"""