Arthur: update repo sync
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: Ice9068063692606831cd7db0920e6ff4ce7ab2a0
diff --git a/arthur-scripts/parse_refspec.py b/arthur-scripts/parse_refspec.py
index 0e1b87b..963fc70 100755
--- a/arthur-scripts/parse_refspec.py
+++ b/arthur-scripts/parse_refspec.py
@@ -1,12 +1,12 @@
#!/usr/bin/env python3
#
-# Copyright (c) 2019-2020 Arm Limited. All rights reserved.
+# Copyright (c) 2019-2022 Arm Limited. All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
#
# This script parse the gerrit query results from the stdin
-# and return the correct refspec
+# and return the correct refspec
import sys
import json
@@ -14,6 +14,8 @@
def print_topic_tip(query_results):
patchsets = []
parents = []
+ project = query_results[0]["project"]
+ topic = query_results[0]["topic"]
# For each change, get its most recent patchset
for change in query_results:
@@ -29,9 +31,9 @@
# There must be only one patchset remaining, otherwise the tip is ambiguous
if len(tips) > 1:
- raise Exception("Has no unique tip commit.")
+ raise Exception("{} in {} has no unique tip commit.".format(topic, project))
if len(tips) == 0:
- raise Exception("No tip commit found.")
+ raise Exception("No tip commit found for {} in {}.".format(topic, project))
# Print the reference of the topic tip patchset
print(tips[0]["ref"])