[jhbuild] use get_checkoutdir() coherently for all git calls
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] use get_checkoutdir() coherently for all git calls
- Date: Thu, 30 Apr 2009 15:50:27 -0400 (EDT)
commit 78d6b17b667158ccfd6a3067fad75f9231e9485c
Author: Frederic Peters <fpeters 0d be>
Date: Thu Apr 30 21:48:30 2009 +0200
use get_checkoutdir() coherently for all git calls
---
jhbuild/versioncontrol/git.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index 9ee5f91..b23d3bd 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -146,7 +146,7 @@ class GitBranch(Branch):
def get_remote_branches_list(self):
return [x.strip() for x in get_output(['git', 'branch', '-r'],
- cwd=self.srcdir).splitlines()]
+ cwd=self.get_checkoutdir()).splitlines()]
def exists(self):
try:
@@ -179,11 +179,11 @@ class GitBranch(Branch):
self._checkout(buildscript)
def _update_submodules(self, buildscript):
- if os.path.exists(os.path.join(self.srcdir, '.gitmodules')):
+ if os.path.exists(os.path.join(self.get_checkoutdir(), '.gitmodules')):
cmd = ['git', 'submodule', 'init']
- buildscript.execute(cmd, cwd=self.srcdir)
+ buildscript.execute(cmd, cwd=self.get_checkoutdir())
cmd = ['git', 'submodule', 'update']
- buildscript.execute(cmd, cwd=self.srcdir)
+ buildscript.execute(cmd, cwd=self.get_checkoutdir())
def update_dvcs_mirror(self, buildscript):
if not self.config.dvcs_mirror_dir:
@@ -290,11 +290,11 @@ class GitBranch(Branch):
Branch.checkout(self, buildscript)
def tree_id(self):
- if not os.path.exists(self.srcdir):
+ if not os.path.exists(self.get_checkoutdir()):
return None
try:
output = get_output(['git', 'rev-parse', 'HEAD'],
- cwd = self.srcdir)
+ cwd = self.get_checkoutdir())
except CommandError:
return None
except GitUnknownBranchNameError:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]