summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-10-21 21:26:04 +0200
committerGuido Günther <agx@sigxcpu.org>2011-10-22 15:33:40 +0200
commitf4f122a56ab3c4e4f5a63771cb6ef309f1fccd9c (patch)
tree03634683fb210e9ab1b842916aabce101c3fe6f5
parente7a35319ba55b6cf0b88bc6299a85281de2374c1 (diff)
Add GitRepository.remove_files
to mark files for removal Git-Dch: Ignore
-rw-r--r--gbp/git.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/gbp/git.py b/gbp/git.py
index ebc0297..f1b6add 100644
--- a/gbp/git.py
+++ b/gbp/git.py
@@ -530,6 +530,23 @@ class GitRepository(object):
self._git_command("add", args + paths, extra_env)
+
+ def remove_files(self, paths, verbose=False):
+ """
+ Remove files from the repository
+
+ @paths; list of files to remove
+ @param paths: list or string
+ @verbose: be verbose
+ @verbose: bool
+ """
+ if type(paths) in [type(''), type(u'')]:
+ paths = [ paths ]
+
+ args = [] if verbose else ['--quiet']
+ self._git_command("rm", args + paths)
+
+
def format_patches(self, start, end, output_dir):
"""
Output the commits between start and end as patches in output_dir