On 7-10-2011 11:28, Marco van de Voort wrote: > I usually apply patches on FreeBSD, and in rarer cases Linux. > > Even up to date patch doesn't always process lineendings properly btw. I > have to dos2unix often on *nix too. > > Recently a lot of patches with incorrect filenames, or no filenames if the > patch is for a single file, or even not in universal format have been > submitted, and it takes some work (doable, but annoying) to apply them.
Ok, so there's some options: 1. Get a better patch.exe on Windows that deals with LF. 2. Output patches using CRLF. Inconvenience Linux/Unix users 3. Output patches using LF. Inconvenience Windows users I'm going with option 2, as I'm running Windows and people will probably excpect CRLF patches from me (in line with SVN diff). (Of course, I could always use 3 and use git patch...) Created a batch file fpdiff.cmd: @echo off rem Uses git on windows to create a patch with crlf endings. rem Requirements: rem git, linespace converter program (sfk, unix2dos) rem git core.autocrlf setting is true rem Tested git core.whitespace trailing-space,space-before-tab,cr-at-eol but had no effect set OUTPUTNAME=your.diff del %OUTPUTNAME% > NUL 2>1 rem Git diff gives Unix LF line endings; rem we're on Windows so convert to CRLF rem Also, use --no-prefix to strip git prefixes from path rem Redirect errors to bit bucket rem YOU NEED TO USE CALL to call msysgit git commands: rem http://osdir.com/ml/version-control.msysgit/2008-04/msg00012.html call git diff --unified=3 --no-prefix > %OUTPUTNAME% 2>NUL rem Use swiss file knife to convert, but could rem also use cygwin unix2dos sfk lf-to-crlf %OUTPUTNAME% echo Done, output in %OUTPUTNAME% Gives output like attachment. I think I'm satisfied. Hope the committers will be too, when I submit the next patch...
diff --git packages/fcl-extra/src/win/ServiceManager.pas packages/fcl-extra/src/win/ServiceManager.pas index 47bd1cc..af62487 100644 --- packages/fcl-extra/src/win/ServiceManager.pas +++ packages/fcl-extra/src/win/ServiceManager.pas @@ -136,7 +136,8 @@ type procedure GetServiceStatus(SHandle : THandle; Var Status : TServiceStatus); overload; procedure GetServiceStatus(ServiceName : String; Var Status : TServiceStatus); overload; Property Handle : THandle Read FHandle; - Property Acces : DWord read FAccess Write FAccess; + Property Access : DWord read FAccess Write FAccess; + Property Acces : DWord read FAccess Write FAccess; deprecated; //Kept for compatibility Property Services : TServiceEntries Read FServices; published { Published declarations }
_______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal