Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py

branch
6_1_x
changeset 4591
27deaa4e7a77
parent 4021
195a471c327b
child 4632
ca310db386ed
equal deleted inserted replaced
4588:bfa7555f7407 4591:27deaa4e7a77
39 self.pathButton.setIcon(UI.PixmapCache.getIcon("open.png")) 39 self.pathButton.setIcon(UI.PixmapCache.getIcon("open.png"))
40 40
41 self.__ok = self.buttonBox.button(QDialogButtonBox.Ok) 41 self.__ok = self.buttonBox.button(QDialogButtonBox.Ok)
42 self.__ok.setEnabled(False) 42 self.__ok.setEnabled(False)
43 43
44 self.__projectPath = projectPath 44 self.__projectPath = Utilities.toNativeSeparators(projectPath)
45 45
46 self.typeCombo.addItem("Mercurial", "hg") 46 self.typeCombo.addItem("Mercurial", "hg")
47 self.typeCombo.addItem("GIT", "git") 47 self.typeCombo.addItem("GIT", "git")
48 self.typeCombo.addItem("Subversion", "svn") 48 self.typeCombo.addItem("Subversion", "svn")
49 49
93 os.path.join(self.__projectPath, self.pathEdit.text()), 93 os.path.join(self.__projectPath, self.pathEdit.text()),
94 E5FileDialog.Options(E5FileDialog.Option(0))) 94 E5FileDialog.Options(E5FileDialog.Option(0)))
95 95
96 if path: 96 if path:
97 path = Utilities.toNativeSeparators(path) 97 path = Utilities.toNativeSeparators(path)
98 if path.startswith(self.__projectPath): 98 if path.startswith(self.__projectPath + os.sep):
99 path = path.replace(self.__projectPath, "")[1:] 99 path = path.replace(self.__projectPath + os.sep, "")
100 self.pathEdit.setText(path) 100 self.pathEdit.setText(path)
101 else: 101 else:
102 E5MessageBox.critical( 102 E5MessageBox.critical(
103 self, 103 self,
104 self.tr("Add Sub-repository"), 104 self.tr("Add Sub-repository"),

eric ide

mercurial