Index: llvm/utils/git-svn/git-llvm =================================================================== --- llvm/utils/git-svn/git-llvm +++ llvm/utils/git-svn/git-llvm @@ -223,7 +223,7 @@ crlf_files = [] if len(files) == 1: # No need to split propget output on ' - ' when we have one file. - if eol_props.strip() == 'native': + if eol_props.strip() in ['native', 'CRLF']: crlf_files = files else: for eol_prop in eol_props.split('\n'): @@ -237,12 +237,17 @@ eprint(eol_prop) continue (f, eol_style) = prop_parts - if eol_style == 'native': + if eol_style in ['native', 'CRLF']: crlf_files.append(f) - # Reformat all files with native SVN line endings to Unix format. SVN knows - # files with native line endings are text files. It will commit just the - # diff, and not a mass line ending change. - shell(['dos2unix', '-q'] + crlf_files, cwd=svn_sr_path) + if len(crlf_files) > 0: + # Reformat all files with native/CRLF SVN line endings to Unix format. SVN knows + # files with CRLF line endings are text files. It will commit just the diff, + # and not a mass line ending change. + try: + # GnuWin32 dos2unix doesn't have the -q option. + shell(['dos2unix', '-q'] + crlf_files, die_on_failure=False, cwd=svn_sr_path) + except RuntimeError: + shell(['dos2unix'] + crlf_files, die_on_failure=True, cwd=svn_sr_path) def svn_push_one_rev(svn_repo, rev, dry_run):