From: Patrick Donnelly Date: Fri, 3 Nov 2023 17:46:08 +0000 (-0400) Subject: script: enable checkout of specific sha1 as base X-Git-Tag: v19.0.0~105^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=cc747a2d0732776af8af8c3f6d6bbc39205ed095;p=ceph.git script: enable checkout of specific sha1 as base Signed-off-by: Patrick Donnelly --- diff --git a/src/script/ptl-tool.py b/src/script/ptl-tool.py index 095fceb41fc04..176f61f22c8c7 100755 --- a/src/script/ptl-tool.py +++ b/src/script/ptl-tool.py @@ -302,12 +302,13 @@ def build_branch(args): try: base_path = args.base_path + base base = next(ref for ref in G.refs if ref.path == base_path) + # So we know that we're not on an old test branch, detach HEAD onto ref: + base.checkout() except StopIteration: - log.error("Branch " + base + " does not exist!") - sys.exit(1) - - # So we know that we're not on an old test branch, detach HEAD onto ref: - base.checkout() + log.info(f"Trying to checkout uninterpreted base {base}") + c = G.commit(base) + G.git.checkout(c) + assert G.head.is_detached for pr in prs: pr = int(pr)