Commits

Anonymous committed 9adf9d8

reporegistry: Add subrepos could fail due to case and forward/backward slash differences

refs #1052

  • Participants
  • Parent commits 4b4a360
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/reporegistry.py

         path = unicode(FD.getExistingDirectory(caption=caption,
             directory=root, options=FD.ShowDirsOnly | FD.ReadOnly))
         if path:
+            path = os.path.normcase(os.path.normpath(path))
             sroot = paths.find_root(path)
+
+            root = os.path.normcase(os.path.normpath(root))
+
             if sroot != root and root == paths.find_root(os.path.dirname(path)):
                 # The selected path is the root of a repository that is inside
                 # the selected repository