diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2012-01-12 15:22:51 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-01-15 19:50:24 +0100 |
commit | 16a2cd36e60a9241aeff01e923c0b77f7913ce7c (patch) | |
tree | 3418f6a27bac3a4032855d6b1ed98ea659194da3 /gbp/git/repository.py | |
parent | eb618608ceb061b4a06e6eceb6c589a7b6340822 (diff) |
GitRepository: add rename_branch() method
Diffstat (limited to 'gbp/git/repository.py')
-rw-r--r-- | gbp/git/repository.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index d6b9874c..3c798969 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -178,6 +178,16 @@ class GitRepository(object): return self.rev_parse('HEAD') #{ Branches and Merging + def rename_branch(self, branch, newbranch): + """ + Rename branch + + @param branch: name of the branch to be renamed + @param newbranch: new name of the branch + """ + args = GitArgs("-m", branch, newbranch) + self._git_command("branch", args.args) + def create_branch(self, branch, rev=None): """ Create a new branch |