-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scm: natively support patch sets #347
Comments
What do you think about committing the patches to a local 'bob-patched' branch? If doing so it's clear what changes are made by the patches and which are done additionally. This makes updating the SCM easy as we could rebase - at least for git. Don't know how to handle this in |
@rhubert How would you handle patches applied to tarballs then? |
Maybe The idea that I have in mind is that Bob known where patches and SCMs "collide". So when a SCM is updated the patches are first reverted, then the SCM is updated and the patches are re-applied. Typically extracted tarballs are patched and there it currently totally fails if the tarball is updated. In general the solution should be independent of any of the other SCMs IMHO. |
for tarballs you can also create a local git repo ... 🙈 only for patched git's....
Well ... that's heavily used when your're working with patch sets to support different products / versions / variants... checkoutSCM:
- scm: git
url: //foo
tag: v${COMPONENT_VERSION}
checkoutVars: [COMPONENT_VERSION, PROJECT]
checkoutScript: |
if [[ "${COMPONENT_VERSION} == "1.0" ]] then
patchApply v1.0-*.patch
else if [[ "${COMPONENT_VERSION} == "2.0" ]]
patchApply v2.0-*.patch
fi;
if [[ "$PROJECT" == "Project42" ]] then
patchApply project42.patch
fi;
git checkout -b bob-patched
git add .
git commit -m "bob: applied patches" The git repo is just a clean upstream repo but needs to be patched. For v1.0 there are patches a,b,c and for v1.1 d,e,f. In addition to this patch-d is needed build for product_xy. The problem with the last 3 git lines is, that it's still marked as switched in |
But isn't the I think even if Bob supports patches natively this won't solve the scenario above. The repository will always be dirty compared to the upstream server. Also in case of |
It depends... If you see the But maybe it's something like checkoutFinialize: True what I need? The status could be |
Currently patches are applied with a
checkoutScript
which has a number of drawbacks:quilt
patch series files are not easily supportedscmOverrides
checkoutScript
has changed.checkoutScript
has to deal with updates to the underlying checkout. This typically fails if a git repository is patched (and there are updates on a branch.) or if a tarball was updated.The text was updated successfully, but these errors were encountered: