4 messages in com.perforce.p4ruby[p4ruby] cygwin-p4ruby incompatibilit...| From | Sent On | Attachments |
|---|---|---|
| bob p4 | 18 Feb 2008 08:52 | |
| Tony Smith | 19 Feb 2008 02:48 | |
| bob p4 | 19 Feb 2008 07:38 | |
| Tony Smith | 19 Feb 2008 12:41 |
| Subject: | [p4ruby] cygwin-p4ruby incompatibility with p4win![]() |
|---|---|
| From: | Tony Smith (to...@smee.org) |
| Date: | 02/19/2008 02:48:13 AM |
| List: | com.perforce.p4ruby |
Hi Jeff,
For a while I've been scripting perforce commands using cygwin-ruby together with the win32 (non-cygwin) version of p4.exe. I do this mainly because (1) my development environment requires cygwin-ruby; and (2) I want to use the same client spec for both scripting and P4Win, which requires a DOS path in the client spec.
The win32 version of p4.exe can be "tricked" into working with cygwin-ruby by setting PWD before calling p4.exe, ENV["PWD"] = `cygpath -w #{Dir.pwd}`.chomp
I have recently hit the ceiling on the maximum command-line size, which brings me to P4Ruby. However cygwin-ruby requires cygwin-P4Ruby, which cannot be tricked into using DOS paths (as I concluded after some effort).
Thus it would seem that cygwin-P4Ruby cannot be used with a P4Win-compatible client spec. Is this true?
No, you can use an 'alternate root' in your client workspace specification. See the documentation for 'AltRoots' in:
http://www.perforce.com/perforce/doc.073/manuals/cmdref/client.html
Specify your windows path as your main root, and the Cygwin equivalent as an AltRoot.
Also, can someone confirm that a perforce command run through P4Ruby does not have a ceiling on the number of arguments and/or the total command length?
There's no ceiling that I'm aware of, but that doesn't mean there isn't one; don't take it as a challenge ;-)
For what it's worth, P4 breaks long command lines up into batches of 128.
Tony




