[jhbuild] svn on Windows: avoid using os.path.abspath() on module_href



commit 678e2233a036dcc0d53c31cdb78c0a1cc9560f11
Author: Marcin Wojdyr <wojdyr gmail com>
Date:   Mon Jul 2 12:31:30 2012 +0100

    svn on Windows: avoid using os.path.abspath() on module_href
    
    A hack that normalizes svn path doesn't work on Windows. Disable it.

 jhbuild/versioncontrol/svn.py |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/jhbuild/versioncontrol/svn.py b/jhbuild/versioncontrol/svn.py
index 5649417..0f49fdc 100644
--- a/jhbuild/versioncontrol/svn.py
+++ b/jhbuild/versioncontrol/svn.py
@@ -158,9 +158,11 @@ class SubversionRepository(Repository):
         if checkoutdir is None:
             checkoutdir = name
 
-        splitted_href = list(urlparse.urlsplit(module_href))
-        splitted_href[2] = os.path.abspath(splitted_href[2])
-        module_href = urlparse.urlunsplit(splitted_href)
+        # workaround for svn client not handling '..' in URL (#560246, #678869)
+        if os.name != 'nt':
+            splitted_href = list(urlparse.urlsplit(module_href))
+            splitted_href[2] = os.path.abspath(splitted_href[2])
+            module_href = urlparse.urlunsplit(splitted_href)
 
         if self.svn_program == 'bzr' and not revision:
             return bzr.BzrBranch(self, module_href, checkoutdir)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]