[p4] line endings

David Weintraub qazwart at gmail.com
Tue Aug 14 07:16:39 PDT 2007

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.

See <http://www.perforce.com/perforce/doc.072/manuals/p4guide/02_config.html#1082357>
on how to configure LineEnd field in your client.

On 8/14/07, Kilaru Sambaiah <ksambaiah at gmail.com> wrote:
> Hi All,
>   I have a question with line endings. I am using windows client p4win to
> communicate with perforce
>   server. I wanted Unix line endings on sync. How do I set it up on my
> client?
> thanks and regards,
> Sam
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

David Weintraub
qazwart at gmail.com

More information about the perforce-user mailing list