# HG changeset patch
# User Simon Heimberg <sim...@besonet.ch>
# Date 1311390772 -7200
# Node ID eb0fa9dd3fcfe28b7e299f0b27d706cf0135e022
# Parent  47f934942d00c0132c70feca90a71cd4bbf19a5a
reporegistry: allow to work with \ and /

This prevents the error message that C:\example\repo\sub is not a sub repository
of C:/example/repo

diff -r 47f934942d00 -r eb0fa9dd3fcf tortoisehg/hgqt/reporegistry.py
--- a/tortoisehg/hgqt/reporegistry.py   Mit Jul 13 23:06:43 2011 +0200
+++ b/tortoisehg/hgqt/reporegistry.py   Sam Jul 23 05:12:52 2011 +0200
@@ -498,6 +498,9 @@
             directory=root, options=FD.ShowDirsOnly | FD.ReadOnly))
         if path:
             sroot = paths.find_root(path)
+            if os.path.altsep:
+                root = os.path.normcase(root)
+                sroot = os.path.normcase(sroot)
             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

------------------------------------------------------------------------------
Storage Efficiency Calculator
This modeling tool is based on patent-pending intellectual property that
has been used successfully in hundreds of IBM storage optimization engage-
ments, worldwide.  Store less, Store more with what you own, Move data to 
the right place. Try It Now! http://www.accelacomm.com/jaw/sfnl/114/51427378/
_______________________________________________
Tortoisehg-develop mailing list
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to