[p4] How to ignore local newline conversion?

Helck, Christopher chelck at ebs.com
Tue Jul 26 06:41:08 PDT 2005


I recently ran into this problem and decided it is a build issue and not
a Perforce issue. In our case we have a product that is developed and
run in Linux, but the build machine is Windows (don't ask why). The
people who build the product pull the files from Perforce via a label,
and then type "build". They don't know much about Perforce or build
scripts.

When scripts are pulled out of Perforce on the Widows box the line
endings of shell scripts are screwed up and won't work when deployed to
Linux.

I thought about modifying the client view on the build machine, but as
build master I hate relying on a machine's environment -- too fragile. I
also worried that any change I made might effect other projects built
with that view. I decided the correct thing to do is use Ant's fixcrlf
target and fix the line endings at build time.

Most of the time this isn't an issue because we use InstallShield and it
does the right thing at install time, but in this case I had created
some self-extracting shell archives that needed to be run before
InstallShield.

Regards,
C. Helck


-----Original Message-----
From: perforce-user-bounces at perforce.com
[mailto:perforce-user-bounces at perforce.com] On Behalf Of Kevin Calman
Sent: Monday, July 25, 2005 3:41 PM
To: perforce-user at perforce.com
Subject: [p4] How to ignore local newline conversion?


	I am using p4d 2003.2 on Linux, and p4 2004.2 on Windows XP/Pro.
I compile code on Windows for deployment to both Windows and Unix
platforms. When shell scripts (filetype 'text') are extracted on the
build box, they get local newline conversion to DOS style. When the
resulting package is deployed to Unix (Linux), the shell scripts fail
due to bad newlines.
	Is there a way to define these files such that they always
extract (sync) to Unix-style newlines, ignoring local newline
conversion? I do not want to make ALL text filetype do this, just
certain files. A solution that would work based on file extension (*.sh)
would be acceptable. Something like 'p4 edit -t text+d script.bat' or
'p4 edit -t text+u script.sh' to force DOS or Unix newlines,
respectively.
-- 
Opinions herein are exclusively my own, unless you share them. Kevin
Calman, kcalman at tps-software.com, 512/671-7373 x247

_______________________________________________
perforce-user mailing list  -  perforce-user at perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user

The information contained in this e-mail is confidential. This e-mail is intended only for the stated addressee.  If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this e-mail. if you have received this e-mail in error, please inform us immediately and delete it and all copies from your system.

EBS Dealing Resources International Limited. Registered address: 10 Paternoster Square, London EC4M 7DY, United Kingdom. Registered number 2669861.

EBS Dealing Resources, Inc, registered in Delaware. Address: 535 Madison Avenue, 24th Floor, New York, NY 10022, USA, and One upper Pond road, Building F - Floor 3, Parsippany, NJ 07054, USA.

EBS Dealing Resources Japan Limited, a Japanese Corporation. Address: Asteer Kayabacho Bldg, 6th Floor, 1-6-1, Shinkawa, Chuo-Ku,  Tokyo 104-0033, Japan.




More information about the perforce-user mailing list