Home Home > GIT Browse > packaging
diff options
authorMichal Koutný <mkoutny@suse.com>2019-03-11 19:10:58 +0100
committerMichal Koutný <mkoutny@suse.com>2019-03-11 19:10:58 +0100
commit027d52475873ad5c130735999e83eaaed70c307a (patch)
parent2ee9bf30ff017026deb851a2338649e34ef3ef7c (diff)
scripts: git_sort: Warn about missing upstream repo
I've witnessed several people having misconfigured their remotes and then calling sortig scripts on series.conf results in cryptic error messages like: > Traceback (most recent call last): > File "scripts/git_sort/series_sort.py", line 121, in <module> > sorted_entries = lib.series_sort(index, input_entries) > File "/home/mkoutny/suse/kernel-source-12-sp3/scripts/git_sort/lib.py", line 425, in series_sort > for e in sorted(result[head].items(), key=operator.itemgetter(0))]) > KeyError: None HEAD Add warning when the upstream torvalds/linux remote is not found to give users a clue about the situation.
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/git_sort/git_sort.py b/scripts/git_sort/git_sort.py
index a07d737172..1bb1489562 100755
--- a/scripts/git_sort/git_sort.py
+++ b/scripts/git_sort/git_sort.py
@@ -278,6 +278,7 @@ def get_heads(repo):
result = collections.OrderedDict(
[(Head(RepoURL(None), "HEAD"),
+ print("WARNING: Did not find %s in LINUX_GIT remotes." % remotes[0].repo_url.url)
return result