Skip to content

Commit 474f9a5

Browse files
committed
Merge PR ceph#54338 into main
* refs/pull/54338/head: script: enable checkout of specific sha1 as base Reviewed-by: Venky Shankar <[email protected]>
2 parents 011cf0e + cc747a2 commit 474f9a5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/script/ptl-tool.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -302,12 +302,13 @@ def build_branch(args):
302302
try:
303303
base_path = args.base_path + base
304304
base = next(ref for ref in G.refs if ref.path == base_path)
305+
# So we know that we're not on an old test branch, detach HEAD onto ref:
306+
base.checkout()
305307
except StopIteration:
306-
log.error("Branch " + base + " does not exist!")
307-
sys.exit(1)
308-
309-
# So we know that we're not on an old test branch, detach HEAD onto ref:
310-
base.checkout()
308+
log.info(f"Trying to checkout uninterpreted base {base}")
309+
c = G.commit(base)
310+
G.git.checkout(c)
311+
assert G.head.is_detached
311312

312313
for pr in prs:
313314
pr = int(pr)

0 commit comments

Comments
 (0)