osmith submitted this change.
obs: checkout_for_feed + fetch: fix for 2022q1 etc
As Neels pointed out, with the current code the 2022q1 and similar feeds
do not get checked out properly if:
* the repository was not freshly cloned (like jenkins would do)
* the repository was fetched (--git-fetch)
Instead of the last revision of that branch from origin, we get the
revision that was previously checked out on the branch. Fix this by
prepending origin/.
Change-Id: I2e265fc84abd4596c386bb56cbabb2af121dc7ca
---
M scripts/obs/lib/srcpkg.py
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index ec29581..92c3aa7 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -16,7 +16,7 @@
elif feed == "nightly":
lib.git.checkout_default_branch(project)
else: # 2022q1 etc
- lib.git.checkout(project, feed)
+ lib.git.checkout(project, f"origin/{feed}")
def get_git_version_gen_path(project):
To view, visit change 29150. To unsubscribe, or for help writing mail filters, visit settings.