Angel Ezquerra  committed 17aa84f

filectx: avoid crashing when trying to open a missing subrepository

We were only checking whether the folder containing the subrepo existed, but
that does not warantee that the subrepo will open.

  • Participants
  • Parent commits c085955
  • Branches default

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

     def opensubrepo(self):
         path = os.path.join(self.repo.root, self._currentfile)
-        if os.path.isdir(path):
-            spath = path[len(self.repo.root)+1:]
+        spath = path[len(self.repo.root)+1:]
+        if spath in self.ctx.substate and os.path.isdir(path):
             source, revid, stype = self.ctx.substate[spath]
             link = u'repo:' + hglib.tounicode(path)
             if stype == 'hg':