From 267b4e9e74be3a165659d941b0216743ab5106ae Mon Sep 17 00:00:00 2001 From: Guido Guenther Date: Thu, 21 Feb 2008 16:22:43 +0100 Subject: add PristineTar() --- gbp/command_wrappers.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'gbp') 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=""): -- cgit v1.2.3