Commits

Yuya Nishihara committed 9a41a57

manifestmodel: clean up path concatenation which was necessary to build subinfo

  • Participants
  • Parent commits 03439f6

Comments (0)

Files changed (1)

File tortoisehg/hgqt/manifestmodel.py

                     e.status = 'C'
 
         # Add subrepos to the tree
-        def addrepocontentstotree(roote, ctx, toproot=''):
+        def addrepocontentstotree(roote, ctx):
             for path, substate in ctx.substate.iteritems():
                 if not 'S' in self._statusfilter:
                     break
                 # to the status filter
                 abspath = os.path.join(ctx._repo.root, path)
                 if os.path.isdir(abspath):
-                    if toproot:
-                        # Note that we cannot use os.path.join() because we
-                        # need path items to be separated by "/"
-                        toprelpath = '/'.join([toproot, path])
-                    else:
-                        toprelpath = path
-                    toprelpath = util.pconvert(toprelpath)
                     srev = substate[1]
                     sub = ctx.sub(path)
                     if srev and isinstance(sub, subrepo.hgsubrepo):
                         if srev in srepo:
                             e.ctx = sctx = srepo[srev]
                             # Add the subrepo contents to the tree
-                            e = addrepocontentstotree(e, sctx, toprelpath)
+                            e = addrepocontentstotree(e, sctx)
 
             # Add regular files to the tree
             status, uncleanpaths, files = getctxtreeinfo(ctx)