On Fri, Nov 8, 2013 at 11:12 AM, Ruben Van Boxem
<vanboxem.ru...@gmail.com>wrote:

> 2013/11/8 Jon <jon.for...@gmail.com>
>
>> Largely irrelevant these days given how well git and mercurial run on
>> windows, but is anyone aware of a self-contained patch exe that runs on
>> windows and understands both unified diffs and git diffs?
>>
>> The goal is to have a simple, single file, no dependency patching tool
>> for use with automated build recipes like a few of you maintain. Last time
>> I looked the gnuwin32 `patch` port didn't support git style diffs.
>>
>> I'd thought of spelunking the git or mercurial source to try to extract
>> the `git apply` or `hg import` functionality into a single exe, but other
>> siren songs have been more distracting.
>>
>
> Don't bother. There are a thousand ways of getting git to give you a diff.
> See e.g. here for tips:
> http://stackoverflow.com/questions/4610744/can-i-get-a-patch-compatible-output-from-git-diff
>
> What is patch not doing that you want? It should be able to handle git
> diff output if you pass the magic -p option or modify the resulting diff a
> bit.
>
>
I need a no-install exe that can apply both git and unified style patches
as-is without requiring manual tweaks to the patch. Generating diffs isn't
a concern.

Good point, I'll play again with
http://sourceforge.net/projects/gnuwin32/files/patch/2.5.9-7/ with some git
style patches. Essentially, I'm giving into my OCD quest for the "perfect"
source build recipe framework on windows. For example, my buildlets toy
project

https://github.com/jonforums/buildlets/blob/master/README.md

has minimal pre-install requirements and it iteratively bootstaps itself
and its tools, eg - 7za. A user downloads the bootstrap script via curl,
wget, or a powershell one-liner, runs the bootstrap script which downloads
needed tools and desired buildlets. Then run the buildlet which downloads
source and builds x32 or x64 and a SHA1 checksum. Done.

Other than requiring a ming/mingw-w64 based toolchain and a
`toolchain.json` config file describing the toolchains, there's not much
other pre-install work required beyond having powershell 3.0+ and .NET
v3.5+ installed.

Next step is to add true patching capability because this is, well, a bit
too lame to call patching:

https://github.com/jonforums/buildlets/blob/master/build_openssl.ps1#L61-L65

I'm close to just requiring the user to have git installed and use `git
apply` when necessary on a library of patches similar to what Alexey and
nixMan maintain.

What I really want is a self contained patch tool as part of the project
living in https://github.com/jonforums/buildlets/tree/master/tools that
gets "download installed" as part of the current bootstrapping process. It
needs to comprehend any unified or git style diff I create or hijack from
Alexey and others ;)
------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to