aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gbp/command_wrappers.py24
-rw-r--r--gbp/git/repository.py2
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