Commits

Yuya Nishihara committed 32c2dec

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

Comments (0)

Files changed (1)

tortoisehg/hgqt/reporegistry.py

 
             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)