From: Patrick Donnelly Date: Fri, 6 Oct 2017 18:52:04 +0000 (-0700) Subject: ptl-tool: checkout branch after creation X-Git-Tag: v13.0.1~633^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=ae5d61bfd5e8f32008caa95a32010f0118a456cc;p=ceph-ci.git ptl-tool: checkout branch after creation Signed-off-by: Patrick Donnelly --- diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py index cb754101e3f..083e551a8fa 100755 --- a/src/script/ptl-tool.py +++ b/src/script/ptl-tool.py @@ -231,16 +231,8 @@ def build_branch(args): if branch == 'HEAD': log.info("Leaving HEAD detached; no branch anchors your commits") else: - # Delete test branch if it already existed - try: - getattr(G.branches, branch).delete( - G, getattr(G.branches, branch), force=True) - log.info("Deleted old test branch %s" % branch) - except AttributeError: - pass - - G.create_head(branch) - log.info("Created branch {branch}".format(branch=branch)) + G.head.reference = G.create_head(branch, force=True) + log.info("Checked out new branch {branch}".format(branch=branch)) # tag it for future reference. for i in range(0, 100):