From: Guido Günther Date: Mon, 24 Oct 2011 12:51:04 +0000 (+0200) Subject: GitRepository: add pull() X-Git-Tag: debian/0.6.0_git20111202~80 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5b8a7aba07f1ae09ff3c80360e1c18b8756d0e58;p=tools%2Fgit-buildpackage.git GitRepository: add pull() --- diff --git a/gbp/git.py b/gbp/git.py index 34d8140..d049f15 100644 --- a/gbp/git.py +++ b/gbp/git.py @@ -821,6 +821,20 @@ class GitRepository(object): self._git_command("fetch", [ args ]) + def pull(self, repo=None, ff_only=False): + """ + Fetch and merge from another repository + + @param repo: repository to fetch from + @type repo: string + @param ff_only: only merge if this results in a fast forward merge + @type ff_only: bool + """ + args = [] + args += [ '--ff-only' ] if ff_only else [] + args += [ repo ] if repo else [] + self._git_command("pull", args) + def has_submodules(self): """Does the repo have any submodules?""" if os.path.exists('.gitmodules'):