aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-obranch4
1 files changed, 3 insertions, 1 deletions
diff --git a/git-obranch b/git-obranch
index 2a2d367..ebd94bf 100755
--- a/git-obranch
+++ b/git-obranch
@@ -65,6 +65,8 @@ echo '.osc/' >> .git/info/exclude
echo '_scmsync.obsinfo' >> .git/info/exclude
# Set config
git config "lfs.$(git remote get-url myproj)/info/lfs.locksverify" true
+# Switch to factory branch, obs_state is just a record of the old state
+git checkout --force -b factory myproj/factory
# # SCM Sync settings
OSC_META=$(mktemp /tmp/osc_meta_data.XXXXXX.xml)
@@ -76,6 +78,6 @@ osc meta pkg "$DEVPRJ" "$PKG" >"$OSC_META" 2>/dev/null
# (https://stackoverflow.com/a/1732454/164233) we can use
# xmlstarlet instead.
if ! grep '<scmsync>' "$OSC_META" >/dev/null 2>&1 ; then
- sed -e "/<\/description>/a\ \ <scmsync>$(git remote get-url myproj)<\/scmsync>" \
+ sed -e "/<\/package>/i\ \ <scmsync>https://src.opensuse.org/pool/$PKG<\/scmsync>" \
"$OSC_META" | osc meta pkg "$DEVPRJ" "$PKG" -F -
fi