jhbuild r1920 - in trunk: . jhbuild/versioncontrol



Author: malureau
Date: Sun Mar  9 18:35:24 2008
New Revision: 1920
URL: http://svn.gnome.org/viewvc/jhbuild?rev=1920&view=rev

Log:
2008-03-10  Marc-Andre Lureau  <marcandre lureau gmail com>

        * jhbuild/versioncontrol/git.py: recent versions of git should not
        do a checkout of origin/master, but the local branch name.
        (closes: #511398)


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	Sun Mar  9 18:35:24 2008
@@ -140,8 +140,9 @@
         else:
             buildscript.execute(cmd, 'git', cwd=self.config.checkoutroot)
 
-        buildscript.execute(['git', 'checkout', self.branchname], 'git',
-                    cwd = self.srcdir)
+        if self.branch:
+            buildscript.execute(['git', 'checkout', '-b', self.branch, self.branchname], 'git',
+                                cwd = self.srcdir)
 
         if self.config.sticky_date:
             self._update(buildscript)
@@ -161,8 +162,10 @@
             buildscript.execute(['git', 'reset', '--hard', commit],
                                 'git', cwd=cwd)
 
-        buildscript.execute(['git', 'checkout', self.branchname], 'git',
-                    cwd = self.srcdir)
+        if self.branch:
+            buildscript.execute(['git', 'checkout', self.branch], 'git', cwd = self.srcdir)
+        else:
+            buildscript.execute(['git', 'checkout'], 'git', cwd = self.srcdir)
 
         if not self.tag:
             if self.branch:



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