diff hgext/lfs/__init__.py @ 36921:32f9b7e3f056

templater: move hybrid class and functions to templateutil module And make _hybrid and _mappable classes public. _showlist() is still marked as private since it's weird and third-party codes shouldn't depend on it.
author Yuya Nishihara <yuya@tcha.org>
date Thu, 08 Mar 2018 23:15:09 +0900
parents c3f9d0c303e8
children aa97e06a1912
line wrap: on
line diff
--- a/hgext/lfs/__init__.py	Thu Mar 08 23:10:46 2018 +0900
+++ b/hgext/lfs/__init__.py	Thu Mar 08 23:15:09 2018 +0900
@@ -143,7 +143,7 @@
     registrar,
     revlog,
     scmutil,
-    templatekw,
+    templateutil,
     upgrade,
     util,
     vfs as vfsmod,
@@ -375,12 +375,12 @@
     makemap = lambda v: {
         'file': v,
         'lfsoid': pointers[v].oid() if pointers[v] else None,
-        'lfspointer': templatekw.hybriddict(pointer(v)),
+        'lfspointer': templateutil.hybriddict(pointer(v)),
     }
 
     # TODO: make the separator ', '?
-    f = templatekw._showlist('lfs_file', files, templ, mapping)
-    return templatekw._hybrid(f, files, makemap, pycompat.identity)
+    f = templateutil._showlist('lfs_file', files, templ, mapping)
+    return templateutil.hybrid(f, files, makemap, pycompat.identity)
 
 @command('debuglfsupload',
          [('r', 'rev', [], _('upload large files introduced by REV'))])