[Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread Jon
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.
--
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=60136231iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread Ruben Van Boxem
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.

Ruben



 --
 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=60136231iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


--
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=60136231iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread Jon
On Fri, Nov 8, 2013 at 11:12 AM, Ruben Van Boxem
vanboxem.ru...@gmail.comwrote:

 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=60136231iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 08.11.2013 23:00, Jon wrote:
 On Fri, Nov 8, 2013 at 11:12 AM, Ruben Van Boxem 
 vanboxem.ru...@gmail.comwrote:
 
 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.

AFAIK, GNU patch is able to apply patches that git format-patch
produces. So a statically-linked version of it would do the trick, i
imagine.

 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.

Personally, i use Python as a base for such things. Python and a
minimal 20MB subset of MSYS2 packages (wget, tar, xz) that require no
installation or setup.


- -- 
O ascii ribbon - stop html email! - www.asciiribbon.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSfTl0AAoJEOs4Jb6SI2Cwa8YH/39nxhYKlUQ5iWB7mjjnm0yE
rUtcFvygZ/2Psp9NjTmclxIUkUUkaR/KQ3PIek4A13M5i5HRBmH0afUPbJVrWFmI
ulENWa61KT0RNZ6acdUCrQKCn/LNQkhyP/BX7Sg3m7q9X5jlNfNk1D1skzZDkCV7
LKWq8looskgMEJVprIuCKYqnibuXG2Ju3V2Hcstntq76+whaWEwr2WU3IQEMWyhq
k0kccuDTxfWbaU+QAmjhACOqJjZfu9tnyQ8kTCzwktNb4nxsjRhVIk2EjWMEOLRq
qF6lAkLv8L9FKZ1+dcEZJddNWDBfX3fQcyeEQVBdeeQQocZJ35Qwogh6M7ru1BQ=
=sBEo
-END PGP SIGNATURE-

--
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=60136231iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread Jon
  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.

 AFAIK, GNU patch is able to apply patches that git format-patch
 produces. So a statically-linked version of it would do the trick, i
 imagine.



I hope so. But that would mean either my memory is bad or I've been far too
lazy ;)




 Personally, i use Python as a base for such things. Python and a
 minimal 20MB subset of MSYS2 packages (wget, tar, xz) that require no
 installation or setup.



Nice. I see I need to look at your sbuild project again to see what clever
things you're doing to subset MSYS2.

One day buildlets is going to sprout a toolchain buildlet that downloads
and assembles minimal MSYS2 plus mingwbuilds-based 32 and 64bit toolchains
for those who don't already have a favorite toolchain installed.
--
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=60136231iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] [OT] stand alone git aware patch tool for windows?

2013-11-08 Thread LRN
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 

 Personally, i use Python as a base for such things. Python and a 
 minimal 20MB subset of MSYS2 packages (wget, tar, xz) that
 require no installation or setup.
 
 
 
 Nice. I see I need to look at your sbuild project again to see what
 clever things you're doing to subset MSYS2.

Actually, the only reason i use MSYS2 components is because only MSYS2
tar can correctly untar packages with symlinks. Otherwise i would have
(and i did for some time) used Python for downloading (urllib) and 7z
for unpacking. But symlinks make msys2-tar mandatory, and i rely on
symlinks a lot these days.

- -- 
O ascii ribbon - stop html email! - www.asciiribbon.org
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.11 (MingW32)

iQEcBAEBAgAGBQJSfUAoAAoJEOs4Jb6SI2Cw8zwH/jyfgwyfp9WJjXl5jOy96fER
XmjaPIiDeihvlAKT7kvPfKeoWwNW6UGMKDFAEfWp1mvCJCc+of8jx2sikvAbGbP9
38SAUxyj9r80yycrH2xsskERx9xJXdoLkmvMvjOT3s4cflFCIITSti/ax65twjzy
cJOYM0krthy5x8jM4+Eg3Y1HVuBhdJQ+CA0RqEGaQKHjP/j2jxuLX/dTNbZgJLP6
souwLQ3LPt10qx/wZE+T3yefXs6JIRyCFtC46e+vSVzWnYEmqkGJxo52TWNJl8jP
z6STuGdWccRTp7pAJiuO6rqNJrZCF3XlfGMThj9hwHJMENsj3GU8bMeotiXydhA=
=Oc9y
-END PGP SIGNATURE-

--
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=60136231iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public