Fixed an issue in the Mercurial Add Subrepository dialog. 6_1_x

Sun, 29 Nov 2015 17:26:31 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 29 Nov 2015 17:26:31 +0100
branch
6_1_x
changeset 4591
27deaa4e7a77
parent 4588
bfa7555f7407
child 4592
263812ee54db

Fixed an issue in the Mercurial Add Subrepository dialog.

Plugins/VcsPlugins/vcsMercurial/HgAddSubrepositoryDialog.py file | annotate | diff | comparison | revisions
--- 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