[
https://issues.apache.org/jira/browse/HADOOP-10040?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13792388#comment-13792388
]
Chris Nauroth commented on HADOOP-10040:
----------------------------------------
Hi, [~yingdachen]. I'm guessing that you had checked out the code from
Subversion and not Git. Can you please confirm?
We've set up line ending exceptions like this already for Git, covering *.bat,
*.cmd, *.csproj, and *.sln. This is specified in .gitattributes:
{code}
*.bat text eol=crlf
*.cmd text eol=crlf
*.csproj text merge=union eol=crlf
*.sln text merge=union eol=crlf
{code}
This is working correctly for me on a checkout from git. Here is a small
partial hex dump of hadoop.cmd showing 0D 0A for line endings.
{code}
0000000: 4065 6368 6f20 6f66 660d 0a40 7265 6d20 @echo off..@rem
0000010: 4c69 6365 6e73 6564 2074 6f20 7468 6520 Licensed to the
0000020: 4170 6163 6865 2053 6f66 7477 6172 6520 Apache Software
0000030: 466f 756e 6461 7469 6f6e 2028 4153 4629 Foundation (ASF)
0000040: 2075 6e64 6572 206f 6e65 206f 7220 6d6f under one or mo
0000050: 7265 0d0a 4072 656d 2063 6f6e 7472 6962 re..@rem contrib
{code}
However, for my checkout of the Subversion repo, I see that I'm getting 0A for
the line endings:
{code}
0000000: 4065 6368 6f20 6f66 660a 4072 656d 204c @echo off.@rem L
0000010: 6963 656e 7365 6420 746f 2074 6865 2041 icensed to the A
0000020: 7061 6368 6520 536f 6674 7761 7265 2046 pache Software F
0000030: 6f75 6e64 6174 696f 6e20 2841 5346 2920 oundation (ASF)
0000040: 756e 6465 7220 6f6e 6520 6f72 206d 6f72 under one or mor
0000050: 650a 4072 656d 2063 6f6e 7472 6962 7574 e.@rem contribut
{code}
I guess we'll need to apply these rules separately for the Subversion repo by
running the appropriate svn propset svn:eol-style commands.
> hadoop.cmd in UNIX format and would not run by default on Windows
> -----------------------------------------------------------------
>
> Key: HADOOP-10040
> URL: https://issues.apache.org/jira/browse/HADOOP-10040
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Yingda Chen
>
> The hadoop.cmd currently checked in into hadoop-common is in UNIX format,
> same as most of other src files. However, the hadoop.cmd is meant to be used
> on Windows only, the fact that it is in UNIX format makes it unrunnable as is
> on Window platform.
> An exception shall be made on hadoop.cmd (and other cmd files for what
> matters) to make sure they are in DOS format, for them to be runnable as is
> when checked out from source repository.
--
This message was sent by Atlassian JIRA
(v6.1#6144)