Skip to content

Commit 9d50d8f

Browse files
martinpittmvollmer
authored andcommitted
bots: Show SHA of origin/master when rebasing (cockpit-project#10579)
This should help with debugging tests which (apparently) got rebased on a too old origin/master checkout.
1 parent f047be3 commit 9d50d8f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bots/tests-invoke

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,8 @@ class PullTask(object):
185185
# Rebase this branch onto the base, but only if it's not already an ancestor
186186
try:
187187
if subprocess.call([ "git", "merge-base", "--is-ancestor", remote_base, "HEAD" ]) != 0:
188-
sys.stderr.write("Rebasing onto " + remote_base + " ...\n")
188+
sha = subprocess.check_output([ "git", "rev-parse", remote_base ], universal_newlines=True).strip()
189+
sys.stderr.write("Rebasing onto {0} ({1}) ...\n".format(remote_base, sha))
189190
subprocess.check_call([ "git", "reset", "HEAD" ])
190191
subprocess.check_call([ "git", "rebase", remote_base ])
191192
except subprocess.CalledProcessError:

0 commit comments

Comments
 (0)