jhbuild r1826 - in trunk: . jhbuild/versioncontrol



Author: fpeters
Date: Wed Jan 16 17:33:18 2008
New Revision: 1826
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1826&view=rev

Log:
* jhbuild/versioncontrol/git.py: fixed git usage when combined with
buildroot, patch by Sylvain Pasche.  (closes: #509468)



Modified:
   trunk/ChangeLog
   trunk/jhbuild/versioncontrol/git.py

Modified: trunk/jhbuild/versioncontrol/git.py
==============================================================================
--- trunk/jhbuild/versioncontrol/git.py	(original)
+++ trunk/jhbuild/versioncontrol/git.py	Wed Jan 16 17:33:18 2008
@@ -79,11 +79,14 @@
         self.tag = tag
 
     def srcdir(self):
+        path_elements = [self.checkoutroot]
         if self.checkoutdir:
-            return os.path.join(self.checkoutroot, self.checkoutdir, self.subdir)
+            path_elements.append(self.checkoutdir)
         else:
-            return os.path.join(self.checkoutroot,
-                                os.path.basename(self.module), self.subdir)
+            path_elements.append(os.path.basename(self.module))
+        if self.subdir:
+            path_elements.append(self.subdir)
+        return os.path.join(*path_elements)
     srcdir = property(srcdir)
 
     def get_checkoutdir(self, copydir=None):



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