Commits

Yuya Nishihara  committed 5273e1e

manifestmodel: inline nested function which lists files to be added

  • Participants
  • Parent commits 1e8b13d

Comments (0)

Files changed (1)

File tortoisehg/hgqt/manifestmodel.py

             return True
         return False
 
-    def getctxtreeinfo(ctx):
-        """
-        Get the context information that is relevant to populating the tree
-        """
-        status = dict(zip(('M', 'A', 'R'),
-                          (set(a) for a in repo.status(ctx.parents()[0],
-                                                       ctx)[:3])))
-        uncleanpaths = status['M'] | status['A'] | status['R']
-        files = itertools.chain(ctx.manifest(), status['R'])
-        return status, uncleanpaths, files
-
     if 'S' in statusfilter:
         _populatesubrepos(roote, statusfilter, namefilter)
-    status, uncleanpaths, files = getctxtreeinfo(roote.ctx)
+
+    ctx = roote.ctx
+    status = dict(zip(('M', 'A', 'R'),
+                      (set(a) for a in repo.status(ctx.parents()[0],
+                                                   ctx)[:3])))
+    uncleanpaths = status['M'] | status['A'] | status['R']
+    files = itertools.chain(ctx.manifest(), status['R'])
 
     # add files to the tree according to their state
     if namefilter: