[p4] line endings

Ivey, William william_ivey at bmc.com
Tue Aug 14 08:29:57 PDT 2007

The last time I looked at the delta files, changing the
line endings of a file created a line-by-line delta for

This was using "unix" on the client which effectively
does no translation between server and client, even on
Windows. (If the file is stored as unix on the server,
that's what you get, but if it stored as Windows, you
get it that way.)

I prefer the unix setting because we have to manage
files in specific formats for both Windows and Unix,
and other settings will mask the actual file content
on at least one system. That has caused a lot of
headaches. (And it makes it very difficult to generate
Unix files on Windows, or the other way around.)

It's not been a problem with Visual Studio since it
doesn't really care about most files, and those it
does care about are generated on a Windows system
to start with and rarely manipulated on any other
kind of system.


-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of David Weintraub

Normally, Perforce stores line endings on the server as "LF" (Unix
style), and normalizes them based on your client (i.e., when a file is
sent to your system, the line endings are changed to "CR/LF". In
theory, it doesn't matter what your client does since Perforce will
automatically fix the line endings anyway.

However, it seems that I've seen Perforce files stored on the server
with CR/LF endings, but these could be a result of a CVS to Perforce

Normally, the default "local" should work for the LineEnd: field no
matter what platform you're using. However, you can set the LineEnd:
field to "unix", "win", "share", and "mac" (although even Mac no
longer uses "mac"). You may want to set your LineEnd field to use
"unix" or "share". "Unix" is good if all of the tools you use
recognize Unix line endings (like VI and Eclipse). However, if you use
VisualStudio, you'll be better with "share".

See Tech Note 63 for a full explanation.

on how to configure LineEnd field in your client.

More information about the perforce-user mailing list