jhbuild r2176 - in trunk: . jhbuild/versioncontrol
- From: herzi svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2176 - in trunk: . jhbuild/versioncontrol
- Date: Mon, 21 Jul 2008 12:51:29 +0000 (UTC)
Author: herzi
Date: Mon Jul 21 12:51:28 2008
New Revision: 2176
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2176&view=rev
Log:
2008-07-21 Sven Herzberg <sven imendio com>
Support git-sbmodule
* jhbuild/versioncontrol/git.py: added git-submodule support
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 Mon Jul 21 12:51:28 2008
@@ -146,6 +146,13 @@
# FIXME: should implement this properly
self._checkout(buildscript)
+ def _update_submodules(self, buildscript):
+ if os.path.exists(os.path.join(self.srcdir, '.gitmodules')):
+ cmd = ['git', 'submodule', 'init']
+ buildscript.execute(cmd, 'git', cwd = self.srcdir)
+ cmd = ['git', 'submodule', 'update']
+ buildscript.execute(cmd, 'git', cwd = self.srcdir)
+
def _checkout(self, buildscript, copydir=None):
cmd = ['git', 'clone', self.module]
if self.checkoutdir:
@@ -169,6 +176,8 @@
if self.config.sticky_date:
self._update(buildscript)
+ self._update_submodules(buildscript)
+
def _update(self, buildscript, copydir=None):
cwd = self.get_checkoutdir(copydir)
@@ -200,6 +209,8 @@
else:
buildscript.execute(['git', 'rebase', 'origin', 'master'], 'git', cwd=cwd)
+ self._update_submodules(buildscript)
+
def checkout(self, buildscript):
if self.checkout_mode in ('clobber', 'export'):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]