My apologies, but it seems that only such a convoluted shell script seems to achieve the correct results for different remotes:
http://wiki.winehq.org/GitWine#head-3fe70b8c0310e61d94ba30fe7edf19bd0630e1ef
If anyone has a simpler solution, I can definitely update.
Unfortunately, the more intuitive git format-patch -k --stdout HEAD~79..HEAD~78 > /tmp/patch.old
does not seem to result in patches that can be properly applied onto a different (upstream) remote (see below).
Thank you Misha
p.s. For the curious I have attached both the patch.old generated using the command above, as well as the patch generated by: git format-patch -k -o out --branches --not --remotes=wine-git
I have also attached relevant diff at the very bottom. Output of: diff /tmp/patch.old out/0001
Thank you
---
misha@misha-d630:~/src/wine-git$ git reset --hard origin HEAD is now at 15c6057 shlwapi: Implement StrStrNIW. misha@misha-d630:~/src/wine-git$ git am /tmp/patch.old Applying: d3dx9: Add tests for D3DXCreateSphere vertex buffer description. error: patch failed: dlls/d3dx9_36/tests/mesh.c:489 error: dlls/d3dx9_36/tests/mesh.c: patch does not apply Patch failed at 0001 d3dx9: Add tests for D3DXCreateSphere vertex buffer description. When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". misha@misha-d630:~/src/wine-git$
On 07/19/2010 08:59 PM, Misha Koshelev wrote:
Unfortunately, the more intuitive git format-patch -k --stdout HEAD~79..HEAD~78> /tmp/patch.old
does not seem to result in patches that can be properly applied onto a different (upstream) remote (see below).
Works fine here. You must have had some additional changes between upstream and HEAD~79. Or your tree diverged from the origin (you had some of your patches merged and not rebased) which is the same as above.
And you should really be using "--attach". It's always the better option, especially for the series of patches.
Vitaliy
On Mon, 2010-07-19 at 22:48 -0600, Vitaliy Margolen wrote:
On 07/19/2010 08:59 PM, Misha Koshelev wrote:
Unfortunately, the more intuitive git format-patch -k --stdout HEAD~79..HEAD~78> /tmp/patch.old
does not seem to result in patches that can be properly applied onto a different (upstream) remote (see below).
Works fine here. You must have had some additional changes between upstream and HEAD~79. Or your tree diverged from the origin (you had some of your patches merged and not rebased) which is the same as above.
Just to double check, I have the following layout: origin git@github.com:misha680/wine.git (fetch) origin git@github.com:misha680/wine.git (push) upstream http://github.com/mirrors/wine.git (fetch) upstream http://github.com/mirrors/wine.git (push) wine-git git://source.winehq.org/git/wine.git (fetch) wine-git git://source.winehq.org/git/wine.git (push)
And the following patches: misha@misha-d630:~/src/wine-d3dx9$ git log wine-git/master | head -n 5 commit 15c6057ce1454004ac8120fc079ef581fa0efb9c Author: Andrew Nguyen anguyen@codeweavers.com Date: Sun Jul 18 19:35:43 2010 -0500
shlwapi: Implement StrStrNIW.
misha@misha-d630:~/src/wine-d3dx9$ git log HEAD~79 | head -n 15 commit 8e7a26b5926c9246d7d33930ccffd27c8fb66cfe Author: Misha Koshelev misha680@gmail.com Date: Wed Jul 7 09:59:52 2010 -0500
d3dx9: Test number of vertices for D3DXCreateSphere, retrieve vertex buffer.
commit 15c6057ce1454004ac8120fc079ef581fa0efb9c Author: Andrew Nguyen anguyen@codeweavers.com Date: Sun Jul 18 19:35:43 2010 -0500
shlwapi: Implement StrStrNIW.
Is there a better command to use? (fyi my upstream is called wine-git as per reference in my previous post and what I had added on wiki yesterday - I actually have it point to wine git rather than GitHub mirror).
And you should really be using "--attach". It's always the better option, especially for the series of patches.
Duly noted.
Vitaliy
Misha
On Mon, 2010-07-19 at 22:48 -0600, Vitaliy Margolen wrote:
On 07/19/2010 08:59 PM, Misha Koshelev wrote:
Unfortunately, the more intuitive git format-patch -k --stdout HEAD~79..HEAD~78> /tmp/patch.old
does not seem to result in patches that can be properly applied onto a different (upstream) remote (see below).
Works fine here. You must have had some additional changes between upstream and HEAD~79. Or your tree diverged from the origin (you had some of your patches merged and not rebased) which is the same as above.
And you should really be using "--attach". It's always the better option, especially for the series of patches.
Vitaliy
Dear Vitaliy and all:
I have spent some time investigating this.
I have created an entirely new GitHub fork and, indeed, the two statements: a) git format-patch -n --attach --stdout HEAD~80..HEAD~79 b) git format-patch -k -o out upstream/stable..origin seem to result in patches that apply to wine-git in this case.
I have also spent some time updating the GitHub information on the GitWine wiki, and I believe it should now be streamlined and correct: http://wiki.winehq.org/GitWine#head-0e6d3133a16d3a26de956c500675e5e623462a9e
I am still not quite sure why I had this divergence between patches generated using (a) and (b) in my previous GitHub fork, but my guess is that this comes from using git merge rather than git rebase when updating my repository to match upstream Wine. In any case, I will have to wait and see whether this happens again.
Finally, thanks to some helpful comments from others, I will try to contain my enthusiasm and not send so many emails to wine-devel. I will restrict myself to major milestones & such.
Thank you all for your help! Misha