Changeset aa981986702c…
Parent 68c1c4ab3eeb…
by
Changes to one file · Browse files at aa981986702c Showing diff from parent 68c1c4ab3eeb Diff from another changeset...
@@ -538,7 +538,12 @@ def newRepository(self):
""" Run init dialog """
from tortoisehg.hgqt.hginit import InitDialog
- initdlg = InitDialog(parent=self)
+ repoWidget = self.repoTabsWidget.currentWidget()
+ if repoWidget:
+ path = os.path.dirname(repoWidget.repo.root)
+ else:
+ path = os.getcwd()
+ initdlg = InitDialog([path], parent=self)
if initdlg.exec_():
path = initdlg.getPath()
self.openRepo(path)
|
Loading...