1. TortoiseHg
  2. TortoiseHg
  3. thg

Commits

Yuya Nishihara  committed 32c2dec

reporegistry: warn if adding non-repository folder as subrepo (fixes #1830)

  • Participants
  • Parent commits 1df0f23
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/reporegistry.py

View file
 
             root = os.path.normcase(os.path.normpath(root))
 
-            if not os.path.isdir(sroot):
+            if not sroot:
+                qtlib.WarningMsgBox(_('Cannot add subrepository'),
+                    _('%s is not a valid repository') % path,
+                    parent=self)
+                return
+            elif not os.path.isdir(sroot):
                 qtlib.WarningMsgBox(_('Cannot add subrepository'),
                     _('"%s" is not a folder' % sroot),
                     parent=self)