Re: `mtn cat` garbling Windows newlines

[email protected]
Newsgroups gmane.comp.version-control.monotone.devel
Message-ID <[email protected]>
> [Stephe]
> Please add your checkin comment to the issue (211), so the
> info is
> preserved in a more accessible form.

Will do.

> 
> > Could someone run "./run_func_tests cat_do" for me on a
> Windows build?
> 
> It fails; there is an extra CR in stdout:
> 
> stephe@takver$ dump numbers
> numbers:
> 00000000  310d 0a32 0d0a       
>                
>   1..2..
> stephe@takver$ dump stdout
> stdout:
> 00000000  310d 0d0a 320d 0d0a     
>            
>    1...2...
> stephe@takver$ dump expected
> expected:
> 00000000  310d 0a32 0d0a       
>                
>   1..2..

Thanks for running the test. I'm also pleased that the test fails and is reproducible.

> The problem does seem to be cmd_files.cc dump_file. It needs
> to write a
> file_data object to a std::ostream. What function would you
> recommend
> instead of '<<'?

I did manage to get something compiled that passed the test on Linux but can't find it now. It was something involving (), c_str() and val() on the 'dat' variable (not sure about that one, might have been dat()). I didn't commit it in case someone better at C++ had a better way.

Got to rush now, but I'll update the issue and try and find the patch.

Cheers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.