jhbuild r1813 - in trunk: . jhbuild/versioncontrol



Author: fpeters
Date: Mon Jan 14 13:30:00 2008
New Revision: 1813
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1813&view=rev

Log:
* jhbuild/versioncontrol/cvs.py, jhbuild/versioncontrol/svn.py: never
wipe dir in update mode  (see: #509365)



Modified:
   trunk/ChangeLog
   trunk/jhbuild/versioncontrol/cvs.py
   trunk/jhbuild/versioncontrol/svn.py

Modified: trunk/jhbuild/versioncontrol/cvs.py
==============================================================================
--- trunk/jhbuild/versioncontrol/cvs.py	(original)
+++ trunk/jhbuild/versioncontrol/cvs.py	Mon Jan 14 13:30:00 2008
@@ -294,19 +294,20 @@
             else:
                 self._export(buildscript)
         elif self.checkout_mode in ('update', 'copy'):
-            copydir = None
             if self.checkout_mode == 'copy' and self.config.copy_dir:
                 copydir = self.config.copy_dir
-            else:
-                copydir = self.config.checkoutroot
-            if os.path.exists(os.path.join(copydir, 
-                              os.path.basename(self.srcdir), 'CVS')):
-                self._update(buildscript, copydir)
-            else:
-                self._wipedir(buildscript)
-                self._checkout(buildscript, copydir)
-            if self.checkout_mode == 'copy' and self.config.copy_dir is not None:
+                if os.path.exists(os.path.join(copydir, 
+                                  os.path.basename(self.srcdir), 'CVS')):
+                    self._update(buildscript, copydir)
+                else:
+                    self._wipedir(buildscript)
+                    self._checkout(buildscript, copydir)
                 self._copy(buildscript, copydir)
+            else:
+                if os.path.exists(self.srcdir):
+                    self._update(buildscript, copydir = self.config.checkoutroot)
+                else:
+                    self._checkout(buildscript, copydir = self.config.checkoutroot)
 
     def force_checkout(self, buildscript):
         self._checkout(buildscript)

Modified: trunk/jhbuild/versioncontrol/svn.py
==============================================================================
--- trunk/jhbuild/versioncontrol/svn.py	(original)
+++ trunk/jhbuild/versioncontrol/svn.py	Mon Jan 14 13:30:00 2008
@@ -260,20 +260,20 @@
             else:
                 self._export(buildscript)
         elif self.checkout_mode in ('update', 'copy'):
-            copydir = None
             if self.checkout_mode == 'copy' and self.config.copy_dir:
                 copydir = self.config.copy_dir
-            else:
-                copydir = self.config.checkoutroot
-
-            if os.path.exists(os.path.join(copydir,
-                              os.path.basename(self.srcdir), '.svn')):
-                self._update(buildscript, copydir)
-            else:
-                self._wipedir(buildscript)
-                self._checkout(buildscript, copydir)
-            if self.checkout_mode == 'copy' and self.config.copy_dir:
+                if os.path.exists(os.path.join(copydir,
+                                  os.path.basename(self.srcdir), '.svn')):
+                    self._update(buildscript, copydir)
+                else:
+                    self._wipedir(buildscript)
+                    self._checkout(buildscript, copydir)
                 self._copy(buildscript, copydir)
+            else:
+                if os.path.exists(self.srcdir):
+                    self._update(buildscript, copydir = self.config.checkoutroot)
+                else:
+                    self._checkout(buildscript, copydir = self.config.checkoutroot)
 
     def force_checkout(self, buildscript):
         self._checkout(buildscript)



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