Priority: Low
Current State: Confirmed
Released In: n/a
Target Release: n/a
Applies To: Engine
Component: RcsLite
Branches:
In testing in a linux VM with data stored in a shared Windows directory, I discovered that revisions were all returned as current with
RcsLite (
RcsWrap was OK).
I was immediately suspicious of line ending.
My patch came down to:
my %is_space = ( ' ' => 1, "\t" => 1, "\n" => 1, "\r" => 1 );
sub _readTo {
my ( $file, $term ) = @_;
my $buf = '';
my $ch;
my $space = 1; # there's a pseudo-newline before every new token
my $string = '';
my $state = 0; # 0 = looking for @, 1 = reading string, 2 = seen second @
while ( read( $file, $ch, 1 ) ) {
+ next if $ch eq "\r";
if ( $ch eq '@' ) {
if ( $state == 1 ) { # if $state eq '@'
$state = 2; # $state = 'e'
}
I doubt that hack is quite right as there is logic handling whitespace using %is_space hash. However, it did mean that revisions now return correctly.
Assuming that there is a real need to handle "\r" before the newline then this fix will need more work.
I note that this is an unusual set-up hence the low priority assigned.
--
JulianLevens - 03 Jan 2014