aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2009-10-24 18:40:34 +0200
committerGuido Günther <agx@sigxcpu.org>2009-10-24 19:56:40 +0200
commitdb7cbab003b8edbfb973ef16d8aa291e7714c173 (patch)
tree257c0485712a924ab17d0d8c7d0d3efd1d588b9d
parent1d8fb9d26594521d1efe743486aba58328c1cfd4 (diff)
add GitFetch
-rw-r--r--gbp/command_wrappers.py10
1 files changed, 10 insertions, 0 deletions
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):