summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Guenther <agx@sigxcpu.org>2008-02-21 16:22:43 +0100
committerGuido Guenther <agx@sigxcpu.org>2008-02-21 16:22:43 +0100
commit267b4e9e74be3a165659d941b0216743ab5106ae (patch)
tree1d1b47d51a6024c1a2c060af16ad0a3c20d4f7db
parent8051c7cf981b1115714de9930ee5560ed0ad7917 (diff)
add PristineTar()
-rw-r--r--gbp/command_wrappers.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py
index 9fdc9198..42177e56 100644
--- a/gbp/command_wrappers.py
+++ b/gbp/command_wrappers.py
@@ -67,6 +67,24 @@ class RunAtCommand(Command):
raise
+class PristineTar(Command):
+ cmd='/usr/bin/pristine-tar'
+ branch='pristine-tar'
+
+ def __init__(self):
+ if not os.access(self.cmd, os.X_OK):
+ raise GbpError, "%s not found - cannot use pristine-tar"
+ Command.__init__(self, self.cmd)
+
+ def commit(self, archive, branch):
+ self.run_errror = "Couldn't commit to %s" % branch
+ self.__call__(['commit', archive, branch])
+
+ def checkout(self, archive):
+ self.run_errror = "Couldn't checkout %s" % archive
+ self.__call__(['checkout', archive])
+
+
class UnpackTarArchive(Command):
"""Wrap tar to Unpack a gzipped tar archive"""
def __init__(self, archive, dir, filter=""):