[PATCH] D32452: [git-llvm] Make `push` work on CRLF files with svn:eol-style=native
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 24 16:00:24 PDT 2017
jlebar added inline comments.
================
Comment at: llvm/utils/git-svn/git-llvm:195
+ sr).split('\n')
+ files = [f.split('/', 1)[1] for f in files]
+ # Use ignore_errors because 'svn propget' prints errors if the file doesn't
----------------
rnk wrote:
> jlebar wrote:
> > Would prefer to call some os.path function if there's one that DTRT for this, but if not, whatever.
> git seems to use forward slashes in its output on Windows, so I hope this is safe. I could probably do `f.split('\\/', 1)[1]`, or try to combine os.path.sep and os.path.altsep, but that doesn't seem better.
Ah, I remember now, I have fought with this before. Path munging is done by msys. Really horrible. But if your Python is not aware of it, then pathsep doesn't work, and...yeah. If this works, is probably good enough for now.
Repository:
rL LLVM
https://reviews.llvm.org/D32452
More information about the llvm-commits
mailing list