Apache OpenOffice (AOO) Bugzilla – Issue 66155
~/.cwsrc parsing broken ...
Last modified: 2006-09-05 14:05:20 UTC
Unfortunately if your CVS password has a space in it - you're thoroughly screwed by the simple ~/.cwsrc parsing I wrote ;-) Jody has a nice patch to fix this - allowing the following: - leading spaces : foo=bar - trailing spaces : foo=bar # asda - quoting : foo='bar' - escaped quotes : foo='b\'ar' any chance of slipping it into a CWS soon ? :-)
Created attachment 36943 [details] patch
Hi Michael, no problem, I'll attach it to the next upcoming CWS.
Thank you. I'd also suggest a warning that failure to connect to server is likely related to an invalid password.
Ause - the old nitpicker - found a small glitch in one of the REs (we spend 20 min to understand it :-) ... and I found another one :-) First (the line with the first + sign in the patch): The square backets in the RE are exchanged for round ones. This isn't right, is it? This either doesn't match (most of the cases) or match in funny ways. See attached snippet. Secondly and here we are nitpicking :-): Please exchange the mentioned round brackets to square brackets in the "if" line of the snippet . Now, if there is a whitespace before the quote sign on both ends of the value string ie, foo= "bar " then the RE which kills the surrounding quotes of the value will also kill the last space inside the quote which still belongs to the value. my $str = 'BAR1= "foo "'; print "$str\n"; if ( $str =~ m/(\w(\w\d)+)=(.*)$/ ) { my $var = $1; my $val = $2; print "$var\n"; print "$val\n"; $val =~ s/(\s*['"])?(.*)\1\s*$/\2/; print "x${val}x\n"; } I told you we are nitpicking ... :-)
> Ause - the old nitpicker - found a small glitch in one of the REs (we spend 20 > min to understand it :-) ... and I found another one :-) Perl - a lovely write-only language :-) > I told you we are nitpicking ... :-) Nah these are good nits; any chance you can fix as you commit ? :-)
Fixed in ause056
looks fine for me now ->mmeeks: you might want to have a look anyhow...
1) You're correct. That was a last minute change that I did not review properly sorry about that. 2) blah. This brings back unpleasant memories of why I haven't used perl in a while. Thanks for the review.
Close issue.