Commits

Yuya Nishihara committed 40753dd

webconf: append "**" to new path if repo can have subrepos

Comments (0)

Files changed (1)

tortoisehg/hgqt/webconf.py

         if not path:
             return
 
-        self._localpath_edit.setText(path)
+        path = unicode(path)
+        if os.path.exists(os.path.join(path, '.hgsub')):
+            self._localpath_edit.setText(os.path.join(path, '**'))
+        else:
+            self._localpath_edit.setText(path)
         if not self.path:
-            self._path_edit.setText(os.path.basename(unicode(path)))
+            self._path_edit.setText(os.path.basename(path))
 
     @pyqtSlot()
     def _updateform(self):