osmith has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ci/+/29152
)
Change subject: obs: prepend origin/ to branch selected with -b
......................................................................
obs: prepend origin/ to branch selected with -b
Doing this makes more sense and is less prone to errors.
Change-Id: I2fa9c457e0e17cdd1b5946dc27ae232ec13bfa25
---
M scripts/obs/README
M scripts/obs/lib/srcpkg.py
2 files changed, 3 insertions(+), 5 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/52/29152/1
diff --git a/scripts/obs/README b/scripts/obs/README
index d9499d8..67d2a2b 100644
--- a/scripts/obs/README
+++ b/scripts/obs/README
@@ -88,11 +88,9 @@
--------------------------------------
cd ~/osmo-dev/src/osmo-ci/scripts/obs/
- ./update_obs_project.py -b origin/neels/pkg home:nhofmeyr:test osmo-hnbgw
+ ./update_obs_project.py -b neels/pkg home:nhofmeyr:test osmo-hnbgw
-The -b option chooses a custom branch to build. It is important to prepend
-'origin/' to 'your/branch', so that repeated dev cycles use the latest
branch
-tip that was fetched instead staying stuck on the local branch.
+The -b option chooses a custom branch to build.
See results
diff --git a/scripts/obs/lib/srcpkg.py b/scripts/obs/lib/srcpkg.py
index 92c3aa7..baf64a9 100644
--- a/scripts/obs/lib/srcpkg.py
+++ b/scripts/obs/lib/srcpkg.py
@@ -10,7 +10,7 @@
def checkout_for_feed(project, feed, branch=None):
""" checkout a commit, either latest tag or master or 20YY branch
"""
if branch:
- lib.git.checkout(project, branch)
+ lib.git.checkout(project, f"origin/{branch}")
elif feed == "latest":
lib.git.checkout_latest_tag(project)
elif feed == "nightly":
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ci/+/29152
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I2fa9c457e0e17cdd1b5946dc27ae232ec13bfa25
Gerrit-Change-Number: 29152
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: newchange