From db7cbab003b8edbfb973ef16d8aa291e7714c173 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Sat, 24 Oct 2009 18:40:34 +0200 Subject: [PATCH] add GitFetch --- gbp/command_wrappers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 1a966c1..cd36bf5 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -195,6 +195,7 @@ class GitCommand(Command): "Mother/Father of all git commands" def __init__(self, cmd, args=[], **kwargs): Command.__init__(self, 'git', [cmd] + args, **kwargs) + self.run_error = "Couldn't run git %s" % cmd class GitInit(GitCommand): @@ -246,6 +247,15 @@ class GitPull(GitCommand): self.run_error = 'Couldn\'t pull "%s" to "%s"' % (branch, repo) +class GitFetch(GitCommand): + """Wrap git fetch""" + def __init__(self, remote = None): + opts = [] + if remote: + opts += [remote] + GitCommand.__init__(self, 'fetch', opts) + + class GitMerge(GitCommand): """Wrap git merge""" def __init__(self, branch, verbose=False): -- 2.7.4