4 messages in com.perforce.perforce-user[p4] Trigger / CR/LF Question.
FromSent OnAttachments
Rumpf, Christopher14 Jan 2003 11:00 
Adrian Kalaveshi14 Jan 2003 11:28 
Rumpf, Christopher14 Jan 2003 11:35 
Robert Duff14 Jan 2003 11:53 
Subject:[p4] Trigger / CR/LF Question.
From:Rumpf, Christopher (CRu@Epylon.com)
Date:01/14/2003 11:00:59 AM
List:com.perforce.perforce-user

Hi.

In the Perforce Admin Guide (Sec 6 pg 86) it states: "The actual contents of the files are not accessible from within the trigger script, since the files are not stored in the depot until the submit completes."

We have a split UNIX/Windows environment here.

I have files in my depot which have Windows carriage returns - which is a real pain for users working in UNIX.

My question is:

"How can I write a trigger/daemon to modify files upon submission (to remove the CR inserted by Win)?"

Ideally - I want to write the following trigger: remove_CR //... "perl -i -pe 's/\r$//s' `p4 opened -ac %changelist%`"

I just started looking into daemons....But I figured I would post this question here first - in case anyone wants to enlighten me.

Thanks all.

/* --- Christopher M. Rumpf --- */