4 messages in com.perforce.perforce-user[p4] Cygwin and P4Win| From | Sent On | Attachments |
|---|---|---|
| Robert Duff | 23 Jul 2002 07:44 | |
| Schaible, Jorg | 24 Jul 2002 02:05 | |
| Kevin McWhirter | 25 Jul 2002 10:56 | |
| "Schaible, Jörg" | 29 Jul 2002 01:47 |
| Subject: | [p4] Cygwin and P4Win![]() |
|---|---|
| From: | "Schaible, Jörg" (Joer...@gft.com) |
| Date: | 07/29/2002 01:47:04 AM |
| List: | com.perforce.perforce-user |
Hi Kevin,
Be careful with this though ...
If you use the cygwin version of the p4 command line tool there is an incompatibility with P4Win. It has to do with CR/LF translations.
In the clientspec there is an option (no)crlf. This option should be set on (crlf) in order to have UNIX p4 and Windows P4Win (and win32 p4) work nicely together. When you are working under windows, CR/LF takes place (because perforce stores the files without CRs - just LFs according to the docs). Under UNIX this is a no-op.
The problem crops up because the cygwin p4 client "thinks" it is running on Unix and does no translations! So you have to be careful to remove the CRs yourself before submitting. If you fail to do this and another Windows developer checks out the file VC++ will automatically "fix" it. P4 will have performed a translation and the file will end up with an end of line sequence of CR-CR-LF. VC++ will add a linefeed between the two CRs - the result is CR-LF-CR-LF - an extra blank line!
In case you misunderstood: I did not recommend the usage of the Cygwin p4 at all. Since it does not understand any DOSish paths, it is incompatible with p4win i.e. you cannot use the same client spec.
Regards, J?rg




