Closed GoogleCodeExporter closed 9 years ago
When CtCmd is not available, ctcmd(1) defaults to 'fork', not 'ipc'mode, but
all the
same. Thanks!
Original comment by marc.girod
on 18 Sep 2008 at 1:53
[deleted comment]
[deleted comment]
Succeeded to reproduce, on Windows, with CtCmd, fork, and ipc, from a script
(thus
using double quotes):
N:\>perl c:\work\t.pl
\atcctest\.
\atcctest\.@@\main\mg\18
directory version
\atcctest\.@@\main\mg\17
"\atcctest\.
\atcctest\.@@\main\mg\18
directory version
\atcctest\.@@\main\mg\17"
"\atcctest\.
\atcctest\.@@\main\mg\18
directory version
\atcctest\.@@\main\mg\17"
"\atcctest\.
\atcctest\.@@\main\mg\18
directory version
\atcctest\.@@\main\mg\17"
Original comment by marc.girod
on 23 Sep 2008 at 8:13
Attachments:
A fix for the Windows side, in (plain) Argv.pm, r113
Original comment by marc.girod
on 7 Oct 2008 at 6:08
The fix is however too brutal, even on Windows. If I add the following to the
script:
$ct->ipc(0);
$a=$ct->argv(qw(des -s "C:\\Program Files"))->qx;
print qq($a\n);
...I get as expected:
ClearCase::CtCmd: Error: Unable to access ""C:\Program": Invalid argument.
ClearCase::CtCmd: Error: Unable to access "Files"": Invalid argument.
Original comment by marc.girod
on 8 Oct 2008 at 8:22
Expected... apart maybe for the 'ClearCase::CtCmd:' part...
Original comment by marc.girod
on 8 Oct 2008 at 8:24
The last test addition is a coding bug: of course 'qw' will split
'"C:\\Program' and
'Files"' into different arguments, and there is no point in trying to join them
back.
This shows a limit to which this usage pattern argv(qw(...))->qx can and should
be
supported, and abused (as a way to 'replace' the rejected argv("...")->qx.
So, even if one can consider mimicking unix/ipc in its support for some usage
patterns, into Windows/ctcmd, these should mabe be discouraged anyway...
I think of adding a 'quote' page to the wiki...
Original comment by marc.girod
on 10 Oct 2008 at 9:04
The syntax used in the test case is now considered incorrect...
One should use instead:
perl -e 'use ClearCase::Argv;
ClearCase::Argv->ctcmd(1);$ct=ClearCase::Argv->new({autochomp=>1});$a=$ct->argv(
qw(des
-fmt),'%En\n%En@@%Vn\n%m\n%En@@%PVn',"/vob/tools/common/perl")->qx;print"$a\n"'
I.e. not leave it to {{{qw}}} to decide how to parse and split the format.
This is impossible in the general case (similar proble as with comment 6).
Original comment by marc.girod
on 22 Feb 2009 at 4:36
Original issue reported on code.google.com by
tanya.sh...@gmail.com
on 18 Sep 2008 at 1:37