Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py

branch
6_1_x
changeset 4591
27deaa4e7a77
parent 4021
195a471c327b
child 4632
ca310db386ed
diff -r bfa7555f7407 -r 27deaa4e7a77 Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py
--- a/Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py	Sun Nov 29 15:40:19 2015 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py	Sun Nov 29 17:26:31 2015 +0100
@@ -41,7 +41,7 @@
         self.__ok = self.buttonBox.button(QDialogButtonBox.Ok)
         self.__ok.setEnabled(False)
         
-        self.__projectPath = projectPath
+        self.__projectPath = Utilities.toNativeSeparators(projectPath)
         
         self.typeCombo.addItem("Mercurial", "hg")
         self.typeCombo.addItem("GIT", "git")
@@ -95,8 +95,8 @@
         
         if path:
             path = Utilities.toNativeSeparators(path)
-            if path.startswith(self.__projectPath):
-                path = path.replace(self.__projectPath, "")[1:]
+            if path.startswith(self.__projectPath + os.sep):
+                path = path.replace(self.__projectPath + os.sep, "")
                 self.pathEdit.setText(path)
             else:
                 E5MessageBox.critical(

eric ide

mercurial