diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-01-31 08:25:01 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-02-20 16:16:12 +0100 |
commit | 10188096fca7f74f9af047a5be82fa1b2279dd45 (patch) | |
tree | 23a79c57bf678f9abfd67721a9e5cc75c8f0c86a /gbp | |
parent | 20819006d71274bd809cf3e1aee62382e24200cb (diff) |
copy_from: remove, not used anymore
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/command_wrappers.py | 24 | ||||
-rw-r--r-- | gbp/git/repository.py | 2 |
2 files changed, 1 insertions, 25 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index f22375d..1e45d0b 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 adf23a7..ce76193 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 |