From 10188096fca7f74f9af047a5be82fa1b2279dd45 Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Tue, 31 Jan 2012 08:25:01 +0100 Subject: copy_from: remove, not used anymore --- gbp/command_wrappers.py | 24 ------------------------ gbp/git/repository.py | 2 +- 2 files changed, 1 insertion(+), 25 deletions(-) (limited to 'gbp') diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index f22375d8..1e45d0b8 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -212,28 +212,4 @@ class GitCommand(Command): self.run_error = "Couldn't run git %s" % cmd -def copy_from(orig_dir, filters=[]): - """ - copy a source tree over via tar - @param orig_dir: where to copy from - @type orig_dir: string - @param filters: tar exclude pattern - @type filters: list of strings - @return: list of copied files - @rtype: list - """ - exclude = [("--exclude=%s" % filter) for filter in filters] - - try: - p1 = subprocess.Popen(["tar"] + exclude + ["-cSpf", "-", "." ], stdout=subprocess.PIPE, cwd=orig_dir) - p2 = subprocess.Popen(["tar", "-xvSpf", "-" ], stdin=p1.stdout, stdout=subprocess.PIPE) - files = p2.communicate()[0].split('\n') - except OSError, err: - raise GbpError, "Cannot copy files: %s" % err - except ValueError, err: - raise GbpError, "Cannot copy files: %s" % err - if p1.wait() or p2.wait(): - raise GbpError, "Cannot copy files, pipe failed." - return [ os.path.normpath(f) for f in files if files ] - # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/gbp/git/repository.py b/gbp/git/repository.py index adf23a7d..ce761930 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -21,7 +21,7 @@ import subprocess import os.path import gbp.log as log -from gbp.command_wrappers import (GitCommand, CommandExecFailed, copy_from) +from gbp.command_wrappers import (GitCommand, CommandExecFailed) from gbp.errors import GbpError from gbp.git.modifier import GitModifier from gbp.git.commit import GitCommit -- cgit v1.2.3