[p4] Line-ending problems
Jamison, Shawn
sjamison at ciena.com
Mon Feb 26 20:06:41 PST 2007
Why not set a trigger to tweak the line ending setting on client
creation or modification?
I'm in process of creating a trigger to run on a form save trigger, I'm
checking if it's a client spec and if it is tweak the line ending then
allow the save.
Going forward it will help prevent this issue if you "force" the line
endings to be one option and one option only.
That doesn't solve how to fix the current issue you are having, but it
may help prevent it.
-Shawn J>
Ciena Corp
Perforce Admin
-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Ivey, William
Sent: Monday, February 26, 2007 3:53 PM
To: perforce-user at perforce.com
Subject: Re: [p4] Line-ending problems
> -----Original Message-----
> From: Jeff Grills [mailto:jgrills at drivensnow.org]
>
> Interesting. I usually use local EOL settings, and then any file
> that's particular about its line-ending convention I set as binary
> instead so that users/clients can't muck it up. The downside to my
> approach is that you need to pass -t to the diff commands to have them
> perforce text diffs on binary files, but that's less common for people
> to need to do. I'd rather require users remember to use a command
> line option on a read-only command than forget to set their EOL and
> mess things by submitting a file with bad EOL sequences.
It can still get mucked up in the same way I described earlier.
In any case, 95% of our files need to be unix style and we do use diff a
lot, usually from P4Win, so setting them to binary would be a pain.
More to the point, they need to appear unix-like even when synced by
Windows clients. Not a good idea to mask the reality of the file from
the develoers, especially since the Windows box may be dealing with a
workspace on unix. That can get confusing. Also, we run cygwin on
Windows and the default there is unix EOLs.
In some cases it doesn't matter which way the EOL falls, but it does
bloat the deltas when every line in a file changes by one character.
-Wm
_______________________________________________
perforce-user mailing list - perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
More information about the perforce-user
mailing list