ci_run_n_monitor: Allow the upstream format to not exist
When pushing directly to a fork, the upstream branch does not exist and thus returns an empty string. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27567>
This commit is contained in:
@@ -435,16 +435,17 @@ if __name__ == "__main__":
|
||||
branch_name,
|
||||
]).decode('ascii').strip()
|
||||
|
||||
remote_rev = check_output([
|
||||
'git', 'rev-parse', tracked_remote,
|
||||
]).decode('ascii').strip()
|
||||
if tracked_remote:
|
||||
remote_rev = check_output([
|
||||
'git', 'rev-parse', tracked_remote,
|
||||
]).decode('ascii').strip()
|
||||
|
||||
if REV != remote_rev:
|
||||
print(
|
||||
f"Local HEAD commit {REV[:10]} is different than "
|
||||
f"tracked remote HEAD commit {remote_rev[:10]}"
|
||||
)
|
||||
print("Did you forget to `git push` ?")
|
||||
if REV != remote_rev:
|
||||
print(
|
||||
f"Local HEAD commit {REV[:10]} is different than "
|
||||
f"tracked remote HEAD commit {remote_rev[:10]}"
|
||||
)
|
||||
print("Did you forget to `git push` ?")
|
||||
|
||||
projects.append(get_gitlab_project(gl, args.project))
|
||||
(pipe, cur_project) = wait_for_pipeline(projects, REV)
|
||||
|
Reference in New Issue
Block a user