From: Barış Metin Date: Tue, 27 Jul 2010 13:45:46 +0000 (+0200) Subject: use to_branch for update to map a local branch to the remote one. this will fix the... X-Git-Tag: 5.0-rc15~53 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=f71d49ce0bb4ed29f0039aa917cfdf46dd7c8128;p=build.git use to_branch for update to map a local branch to the remote one. this will fix the issue with branches. --- diff --git a/module-tools.py b/module-tools.py index ea90f56c..f14da959 100755 --- a/module-tools.py +++ b/module-tools.py @@ -302,7 +302,7 @@ class GitRepository: if branch == "master": self.__run_command_in_repo("git checkout %s" % branch) else: - self.__run_command_in_repo("git checkout origin/%s" % branch) + self.to_branch(branch, remote=True) self.__run_command_in_repo("git fetch origin --tags") self.__run_command_in_repo("git fetch origin") self.__run_command_in_repo("git merge --ff origin/%s" % branch) @@ -338,7 +338,7 @@ class GitRepository: if branch == "master": self.__run_command_in_repo("git push") else: - self.__run_command_in_repo("git push %s:%s" % (branch, branch)) + self.__run_command_in_repo("git push origin %s:%s" % (branch, branch)) self.__run_command_in_repo("git push --tags") def revert(self, f=""):