Closed GoogleCodeExporter closed 9 years ago
Reproduced.
foo> perl -e 'use
ClearCase::Argv;ClearCase::Argv->ipc(1);ClearCase::Argv->dbglevel(2);$ct=ClearCa
se::Argv->new({autochomp=>1});$ct->argv(qw(setview
emagiro))->system;$ct->argv(qw(pwv -s))->system;$ct->argv(qw(ls -s -d
.))->system;$ct->argv(qw(mkattr -rep),q(TR_INFO),q("foo"),q(.))->system'
=> pwv -s
+ <=emagiro
emagiro
+ ($? == 0)
=> ls -s -d .
+ <=.@@/main/2
.@@/main/2
+ ($? == 0)
=> mkattr -rep TR_INFO "foo" .
+ <=cleartool: Error: Invalid string value: "foo".
cleartool: Error: Invalid string value: "foo".
+ ($? == 0)
Original comment by marc.girod
on 25 Mar 2009 at 12:04
Intentions:
- create a test case under the r (regression) directory
- find precisely what change introduced the error, by running the test against
past
versions
- refine the behaviour to be restored:
- it feels right to quote string attribute values, but not other tokens...
- one ought o take care of tokens already containing a single quote
- conjecture for now: the fix could be to change line 578 only
Original comment by marc.girod
on 26 Mar 2009 at 10:38
Done what was intended (r246)
However:
- the test case concerns precisely mkattr
- it fails on all past versions I had in my tree (starting from 1.38), so that
I am
not sure what was the reference in the repotrer environment...
- I offered a fix which passes the test, as well as all the existing tests on 3
platforms (Solaris/CCv6, Windows/CtCmd/CCv7, cygwin/CCv7)
- The fix only adds quotes to tokens containing double quotes
- An extension of the fix may still be needed for tokens containing single
quotes
(e.g. comment such as: "John's idea"), at least if they contain other chars
requiring
quoting.
Original comment by marc.girod
on 27 Mar 2009 at 9:42
Fixed in r248, 1.45a CPAN candidate.
Still need to check that the regression was in fact introduced in Argv 1.23
Original comment by marc.girod
on 28 Mar 2009 at 9:19
Original issue reported on code.google.com by
marc.girod
on 25 Mar 2009 at 12:02