From f4f122a56ab3c4e4f5a63771cb6ef309f1fccd9c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Fri, 21 Oct 2011 21:26:04 +0200 Subject: [PATCH] Add GitRepository.remove_files to mark files for removal Git-Dch: Ignore --- gbp/git.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- 2.7.4