[jhbuild] fix force_checkout command to always wipe source directory first
- From: Frederic Peters <fpeters src gnome org>
- To: svn-commits-list gnome org
- Subject: [jhbuild] fix force_checkout command to always wipe source directory first
- Date: Thu, 23 Apr 2009 14:50:30 -0400 (EDT)
commit a221e78d359810e9bdf671c1fbb312fe2bc35815
Author: Frederic Peters <fpeters 0d be>
Date: Thu Apr 23 20:48:36 2009 +0200
fix force_checkout command to always wipe source directory first
Factor out the force_checkout logic in the base Branch class, adding
consistent support for the force_checkout command to all version
control systems (GNOME #580000).
---
jhbuild/versioncontrol/__init__.py | 3 ++-
jhbuild/versioncontrol/arch.py | 3 ---
jhbuild/versioncontrol/bzr.py | 6 ------
jhbuild/versioncontrol/cvs.py | 3 ---
jhbuild/versioncontrol/git.py | 3 ---
jhbuild/versioncontrol/svn.py | 3 ---
6 files changed, 2 insertions(+), 19 deletions(-)
diff --git a/jhbuild/versioncontrol/__init__.py b/jhbuild/versioncontrol/__init__.py
index 972d437..81fb86f 100644
--- a/jhbuild/versioncontrol/__init__.py
+++ b/jhbuild/versioncontrol/__init__.py
@@ -101,7 +101,8 @@ class Branch:
def force_checkout(self, buildscript):
"""A more agressive version of checkout()."""
- raise BuildStateError(_('force_checkout not implemented'))
+ self._wipedir(buildscript)
+ self.checkout(buildscript)
def tree_id(self):
"""A string identifier for the state of the working tree."""
diff --git a/jhbuild/versioncontrol/arch.py b/jhbuild/versioncontrol/arch.py
index 44c7054..045785f 100644
--- a/jhbuild/versioncontrol/arch.py
+++ b/jhbuild/versioncontrol/arch.py
@@ -158,9 +158,6 @@ class ArchBranch(Branch):
else:
self._checkout(buildscript)
- def force_checkout(self, buildscript):
- self._checkout(buildscript)
-
def tree_id(self):
if not os.path.exists(self.srcdir):
return None
diff --git a/jhbuild/versioncontrol/bzr.py b/jhbuild/versioncontrol/bzr.py
index f0ac7ff..e386d8f 100644
--- a/jhbuild/versioncontrol/bzr.py
+++ b/jhbuild/versioncontrol/bzr.py
@@ -151,12 +151,6 @@ class BzrBranch(Branch):
else:
self._checkout(buildscript)
- def force_checkout(self, buildscript):
- if os.path.exists(self.srcdir):
- self._update(buildscript, overwrite=True)
- else:
- self._checkout(buildscript)
-
def tree_id(self):
if not os.path.exists(self.srcdir):
return None
diff --git a/jhbuild/versioncontrol/cvs.py b/jhbuild/versioncontrol/cvs.py
index e9940cc..811e4af 100644
--- a/jhbuild/versioncontrol/cvs.py
+++ b/jhbuild/versioncontrol/cvs.py
@@ -317,9 +317,6 @@ class CVSBranch(Branch):
else:
self._checkout(buildscript, copydir = self.config.checkoutroot)
- def force_checkout(self, buildscript):
- self._checkout(buildscript)
-
def tree_id(self):
if not os.path.exists(self.srcdir):
return None
diff --git a/jhbuild/versioncontrol/git.py b/jhbuild/versioncontrol/git.py
index 19829a7..ebc67d5 100644
--- a/jhbuild/versioncontrol/git.py
+++ b/jhbuild/versioncontrol/git.py
@@ -275,9 +275,6 @@ class GitBranch(Branch):
else:
self._checkout(buildscript)
- def force_checkout(self, buildscript):
- self.checkout(buildscript)
-
def tree_id(self):
if not os.path.exists(self.srcdir):
return None
diff --git a/jhbuild/versioncontrol/svn.py b/jhbuild/versioncontrol/svn.py
index 4dbe029..570f75c 100644
--- a/jhbuild/versioncontrol/svn.py
+++ b/jhbuild/versioncontrol/svn.py
@@ -331,9 +331,6 @@ class SubversionBranch(Branch):
else:
self._checkout(buildscript, copydir = self.config.checkoutroot)
- def force_checkout(self, buildscript):
- self._checkout(buildscript)
-
def tree_id(self):
if not os.path.exists(self.srcdir):
return None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]