jhbuild r2116 - in trunk: . jhbuild/versioncontrol



Author: malureau
Date: Tue May 27 21:49:10 2008
New Revision: 2116
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2116&view=rev

Log:
2008-05-28  Marc-Andrà Lureau  <marcandre lureau gmail com>

	* jhbuild/versioncontrol/git.py (GitBranch): Use git fetch, and
	rebase.

	* jhbuild/versioncontrol/git.py (GitBranch.tree_id): Use
	git-rev-parse HEAD to fix tree_id issue.  (closes: #535061)


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	Tue May 27 21:49:10 2008
@@ -172,6 +172,8 @@
 
     def _update(self, buildscript, copydir=None):
         cwd = self.get_checkoutdir(copydir)
+        buildscript.execute(['git', 'fetch'], 'git', cwd=cwd)
+
         if self.config.sticky_date:
             commit = self._get_commit_from_date()
             branch = 'jhbuild-date-branch'
@@ -191,9 +193,9 @@
 
         if not self.tag:
             if self.branch:
-                buildscript.execute(['git', 'pull', 'origin', self.branch], 'git', cwd=cwd)
+                buildscript.execute(['git', 'rebase', 'origin', self.branch], 'git', cwd=cwd)
             else:
-                buildscript.execute(['git', 'pull', 'origin', 'master'], 'git', cwd=cwd)
+                buildscript.execute(['git', 'rebase', 'origin', 'master'], 'git', cwd=cwd)
 
 
     def checkout(self, buildscript):
@@ -223,7 +225,7 @@
         if not os.path.exists(self.srcdir):
             return None
         try:
-            output = get_output(['git-rev-parse', self.branchname],
+            output = get_output(['git-rev-parse', 'HEAD'],
                     cwd = self.srcdir)
         except CommandError:
             return None



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