Perforce changed the end of the line

I had a project on Mac and it was uploaded to the perforce server. When I received the project from the PC, all line endings were changed, and now it does not compile on the PC. Is there a way to automatically change the line endings as they were before, or should I send the entire project again from Windows? Is there a way to get perforce to store my files as THEY? I really don't want to have stupid changes in my source files.

Thanks!

EDIT:

This is due to perforce, I just edited 10-20 files on a MAC to make a multi-platform project for compilation. The remaining 140k files were not changed and did not even open on a Mac (they were opened by the compiler to compile them: P). If I copy the project to a PC, the line endings are fine.

+8
perforce
source share
3 answers

Line endings for text files are controlled by your client’s settings. You must ensure that your LineEnd client value is set correctly. In general, this should be left "local", which should do the right thing for any operating system that you use.

However, depending on how this value was set on your Mac during the initial download of the files, I suppose that there may be some problem when synchronizing these files on your computer.

I would check that LineEnd is set to "local" for your clients. There is a link to the Perforce Knowledge Base website , which provides more details on the correct settings for Macintosh clients. Perhaps this is also the place to make sure everything is set up correctly on your Macintosh.

+8
source share

Yes, you can. Using Unix line endings for both of your clients will allow perforce clients to leave files unchanged from how they were sent. You can also configure a trigger on the server to force it this way, refer to my answer to this question:

Customizing Perforce Line Ends

+1
source share

This has nothing to do with perforce, although it does handle this problem.

http://kb.perforce.com/article/63

Line endings on UNIX, PC, and Mac computers are all different. This is what you see. Transferring the same file between your PC and Mac to any media will have the same results. Perhaps you can customize your editor on a Mac to save a Windows line ending file if you want to work around this in a different way.

I was wrong. "Perforce processes all text files using LF lines of the Unix end line." I would check the value of the p4 pE client p4 (it should be locally on both machines, I think) and make sure you are using version p4> = 2001.1

0
source share

All Articles