On Jan 23, 2014, at 4:01 PM, Tian, Hot <[email protected]> wrote:
> I think the long term perfect solution is using eol-style attribute. But I’m
> not sure whether souceforge support this feature. And for short term, I’ve
> fixed the mixed use of CR and CRLF. The recommendation is CRLF for all
> sources except .sh scripts. You can also find similar recommendation in Build
> spec section 4.1.
>
Hot,
It is a feature of subversion, I’m not sure they could turn it off?
1) You can map file types in the global SVN config file. Note this only works
with future submits.
2) You have to do this to all the files:
svn propset svn:eol-style native FileName.c
and then `svn commit` the propset changes.
So some form of script would be required to convert the repo over to the new
svn:eol-sytle native.
I think you will find that the checked in executable files already have
properties set:
~/work/edk2/BaseTools/Bin/Win32>svn proplist build.exe
Properties on 'build.exe':
svn:executable
svn:mime-type
~/work/edk2/BaseTools/Bin/Win32>svn proplist LzmaF86Compress.bat
~/work/edk2/BaseTools/Bin/Win32>
Thanks,
Andrew Fish
> Thanks,
> Hot
>
> From: Andrew Fish [mailto:[email protected]]
> Sent: Friday, January 24, 2014 1:08 AM
> To: Olivier Martin
> Cc: [email protected]
> Subject: Re: [edk2-buildtools] BaseTools Coding Style - Line Endings
>
>
> On Jan 23, 2014, at 2:47 AM, Olivier Martin <[email protected]> wrote:
>
>
> Do you confirm the EDK2 BaseTools coding style apply to BaseTools too?
>
> It would mean C sources must have CRLF line endings.
>
> What about Python source files? It looks there is no requirement on the line
> endings in Python source files. The Python Coding style in
> EDK2:https://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Code_Style/Python
> refers to http://www.python.org/dev/peps/pep-0008/. But there is no
> reference to the line endings.
>
> On this page
> 'http://docs.python.org/3/tutorial/interpreter.html#executable-python-scripts',
> you can also read:
> On BSD’ish Unix systems, Python scripts can be made directly executable, like
> shell scripts (...) On some platforms, this first line must end with a
> Unix-style line ending ('\n'), not a Windows ('\r\n') line ending.
>
> But we do not directly call the Python BaseTools script from the shell. We go
> through $EDK2_ROOT/BaseTools/BinWrappers/PosixLike/ scripts.
>
> Some files in BaseTools have mixed line endings. Control Version Systems
> complain about it. Example:
> - BaseTools\Source\C\GenFw\elf_common.h: mixed CR & CRLF
> - BaseTools\Source\Python\GenFds\Fv.py: mixed CR & CRLF
> - BaseTools\Source\Python\GenFds\GenFdsGlobalVariable.py: mixed CR &
> CRLF
>
> What is the recommended line endings for Python sources?
>
>
> I would point out that subversion can help with this. A property of
> svn:eol-style of native will cause Subversion to store all files internally
> with LF, If you checkout from windows you get CRLF and if you checkout from
> Unix you get LF.
>
> Bash scripts with CRLF crash on Mach OS X. So they need to be LF to function.
>
>
>
> In general it seems there are a lot of editors that get confused with a mixed
> scheme, so cleaning up the miss matches is a good idea. But to me it seems
> the requirement should be to commit in native line endings and setup svn to
> automatically convert.
>
> Thanks,
>
> Andrew Fish
>
>
> Thanks,
> Olivier
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk_______________________________________________
> edk2-buildtools-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
edk2-buildtools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-buildtools-devel