- def update(self, subdir=None, recursive=None):
- self.__run_command_in_repo("git fetch --tags")
- self.__run_command_in_repo("git pull")
+ def update(self, subdir=None, recursive=None, branch="master"):
+ if branch == "master":
+ self.__run_command_in_repo("git checkout %s" % branch)
+ else:
+ self.__run_command_in_repo("git checkout origin/%s" % branch)
+ 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)