This is an archive of the discontinued LLVM Phabricator instance.

[git-llvm] Fix eol conversion on Windows for explicit CRLF files
ClosedPublic

Authored by zturner on Aug 29 2018, 10:46 AM.

Details

Summary

We were checking for 'native', but we weren't considering files that are explicitly EOL. Secondly, dos2unix does not have a -q option on Windows (how did that even work for you?), so if the command fails we retry without -q.

Diff Detail

Repository
rL LLVM

Event Timeline

zturner created this revision.Aug 29 2018, 10:46 AM
rnk added inline comments.Aug 29 2018, 2:06 PM
llvm/utils/git-svn/git-llvm
242 ↗(On Diff #163139)

if crlf_files: is more python-y

248 ↗(On Diff #163139)

-q is for quiet. My goal was to suppress all warning output. Instead, you could probably do:

shell(['dos2unix'] + crlf_files, ignore_errors=True)

I don't remember what warnings I saw, but they were annoying.

zturner updated this revision to Diff 168608.Oct 7 2018, 9:25 PM

I never got around to getting this committed, but incidentally I built a new machine over the weekend and ran into the same problem *plus* an additional problem which is that with Python 3, git apply doesn't like it when universal_newlines is set to true. Without this additional changes, it is impossible to push anything using the following configuration:

Windows 10
Git 2.18.0.windows.1
Python 3.7.0 32-bit
Running git llvm push from a cmd prompt.

rnk accepted this revision.Oct 8 2018, 12:57 PM

lgtm

Python 3.7.0 32-bit

^ There's your problem =P

This revision is now accepted and ready to land.Oct 8 2018, 12:57 PM
In D51444#1258115, @rnk wrote:

lgtm

Python 3.7.0 32-bit

^ There's your problem =P

I know, I know. But we claim to support Python 3, and honestly this is going to be the most likely configuration for new users, because people will just go to the download page and hit download, and that's what they'll get.

This revision was automatically updated to reflect the committed changes.