[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] `mtn cat` garbling Windows newlines
From: |
Stephen Leake |
Subject: |
Re: [Monotone-devel] `mtn cat` garbling Windows newlines |
Date: |
Sun, 09 Sep 2012 11:34:13 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (windows-nt) |
address@hidden writes:
> Hi all,
> I've just pushed 'nvm.cat-garbling-newlines' which contains a test for
> mtn cat` output. The test passes on Linux which matches usage from
> Java and a terminal. However, I'm unable to build or run the test on a
> Windows machine, where the original "problem" was found.
Please add your checkin comment to the issue (211), so the info is
preserved in a more accessible form.
> Could someone run "./run_func_tests cat_do" for me on a Windows build?
It fails; there is an extra CR in stdout:
address@hidden dump numbers
numbers:
00000000 310d 0a32 0d0a 1..2..
address@hidden dump stdout
stdout:
00000000 310d 0d0a 320d 0d0a 1...2...
address@hidden dump expected
expected:
00000000 310d 0a32 0d0a 1..2..
> Also, does anyone have any opinions on the matter?
Using automate is the prefered way for front-ends to access mtn. That
said, I agree 'mtn cat' should not add newlines.
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 tried:
output.write (dat);
but that doesn't compile; ostream::write wants a char*, not a file_data.
I don't see how to convert a file_data to a char*; I can never figure
out these 'vocab' types.
--
-- Stephe