Commits

Yuya Nishihara committed c1257b1

manifestmodel: move mapping of subrepo icons to module

Comments (0)

Files changed (1)

tortoisehg/hgqt/manifestmodel.py

 from tortoisehg.util import hglib
 from tortoisehg.hgqt import qtlib, status, visdiff
 
+_subrepoType2IcoMap = {
+    'hg': 'hg',
+    'git': 'thg-git-subrepo',
+    'svn': 'thg-svn-subrepo',
+    }
+
 class ManifestModel(QAbstractItemModel):
     """
     Qt model to display a hg manifest, ie. the tree of files at a
         if st.icon:
             icOverlay = qtlib.geticon(st.icon[:-4])
             if e.status == 'S':
-                _subrepoType2IcoMap = {
-                  'hg': 'hg',
-                  'git': 'thg-git-subrepo',
-                  'svn': 'thg-svn-subrepo',
-                }
                 if e.subkind in _subrepoType2IcoMap:
                     ic = qtlib.geticon(_subrepoType2IcoMap[e.subkind])
             ic = qtlib.getoverlaidicon(ic, icOverlay)