[p4] line endings

Jeff A. Bowles jab at pobox.com
Tue Aug 14 11:12:44 PDT 2007


I always understood it as "the deltas on the server are stored in
server-native format for speed, but a Perforce user should not know or
care how the server's storing it."

  -jab

On 8/14/07, Ivey, William <william_ivey at bmc.com> wrote:
> The last time I looked at the delta files, changing the
> line endings of a file created a line-by-line delta for
> it.
>
> 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.
>
> -Wm
>
>
> -----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
> conversion.
>
> 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.
> <http://www.perforce.com/perforce/technotes/note063.html>
>
> See
> <http://www.perforce.com/perforce/doc.072/manuals/p4guide/02_config.html
> #1082357>
> on how to configure LineEnd field in your client.
>
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user
>


-- 
---
Jeff Bowles - jeff.a.bowles at gmail.com



More information about the perforce-user mailing list