jhbuild r2473 - in trunk: . jhbuild/versioncontrol
- From: johncarr svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2473 - in trunk: . jhbuild/versioncontrol
- Date: Thu, 6 Nov 2008 11:00:29 +0000 (UTC)
Author: johncarr
Date: Thu Nov 6 11:00:29 2008
New Revision: 2473
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2473&view=rev
Log:
* jhbuild/versioncontrol/git.py:
Fix rebasing when on a branch. Fix update when trying to
checkout a new branch.
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 Thu Nov 6 11:00:29 2008
@@ -199,13 +199,16 @@
buildscript.execute(['git', 'reset', '--hard', commit], cwd=cwd)
if self.branch:
- buildscript.execute(['git', 'checkout', self.branch], cwd=self.srcdir)
+ try:
+ buildscript.execute(['git', 'checkout', self.branch], cwd=self.srcdir)
+ except CommandError:
+ buildscript.execute(['git', 'checkout', '-b', self.branch, self.branchname], cwd=self.srcdir)
else:
buildscript.execute(['git', 'checkout'], cwd=self.srcdir)
if not self.tag:
if self.branch:
- buildscript.execute(['git', 'rebase', 'origin', self.branch], cwd=cwd)
+ buildscript.execute(['git', 'rebase', self.branchname, self.branch], cwd=cwd)
else:
buildscript.execute(['git', 'rebase', 'origin', 'master'], cwd=cwd)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]