(stdout, stderr) = p.communicate()
if p.returncode != 0:
raise Exception("Running %s returned non-zero exit code %d" % (str(cmd), p.returncode))
(stdout, stderr) = p.communicate()
if p.returncode != 0:
raise Exception("Running %s returned non-zero exit code %d" % (str(cmd), p.returncode))
# create/find correct branch
if not git.branch("--list", branchname): # the branch does not yet exit
git.branch(branchname, self.commit)
# create/find correct branch
if not git.branch("--list", branchname): # the branch does not yet exit
git.branch(branchname, self.commit)
git.branch("-u", self.commit, branchname)
# update it to the latest remote commit
git.branch("-u", self.commit, branchname)
# update it to the latest remote commit