monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-devel] Possible bug in 'mtn cat'


From: Marcin W. Dąbrowski
Subject: [Monotone-devel] Possible bug in 'mtn cat'
Date: Mon, 21 Sep 2009 23:57:15 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.8.1.23) Gecko/20090812 Lightning/0.9 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666

Hi.

Today I've found something weird. As image says more, and
working example is even better, with not further ado:

----- BEGIN BATCH -----
mtn version --full
mtn -d mtn.mtn db init
mtn -d mtn.mtn setup . -b mtn.bug.cat
echo x> example.txt
mtn add example.txt
mtn ci -m "Added new file."
mtn cat -r h: example.txt > example-check.txt
xxd -g8 example.txt
xxd -g8 example-check.txt
----- END BATCH -----


On my machine, it gives:

2009-09-21 23:49:57,85 C:\tmp\mtn\mtn-cat-bug
$ mtn version --full
monotone 0.45
(base revision: a19f8b2017c81c3c6c8b2bb3247f865f6ed4e5a9)
Running on          : Windows NT/2000/XP/2003
                      (5.1, build 2600, Service Pack 3)
                      on ia32 (level 6, rev 3846)
C++ compiler        : GNU C++ version 3.4.5
                      (mingw-vista special r3)
C++ standard library: GNU libstdc++ version 20051201
Boost version       : 1_34_1
SQLite version      : 3.6.16 (compiled against 3.6.16)
Lua version         : Lua 5.1
PCRE version        : 7.8 2008-09-05 (compiled against 7.8)
Botan version       : 1.8.4 (compiled against 1.8.4)
Changes since base revision:
format_version "1"

new_manifest [a4583b2d0cae8cb6889b8701543aeb4efc7e1554]

old_revision [a19f8b2017c81c3c6c8b2bb3247f865f6ed4e5a9]

2009-09-21 23:52:12,52 C:\tmp\mtn\mtn-cat-bug
$ mtn -d mtn.mtn db init

2009-09-21 23:52:12,74 C:\tmp\mtn\mtn-cat-bug
$ mtn -d mtn.mtn setup . -b mtn.bug.cat

2009-09-21 23:52:12,79 C:\tmp\mtn\mtn-cat-bug
$ echo x 1>example.txt

2009-09-21 23:52:12,81 C:\tmp\mtn\mtn-cat-bug
$ mtn add example.txt
mtn: adding example.txt to workspace manifest

2009-09-21 23:52:12,85 C:\tmp\mtn\mtn-cat-bug
$ mtn ci -m "Added new file."
mtn: beginning commit on branch 'mtn.bug.cat'
mtn: committed revision 3b2dcf8f04ccf68ef2f1959978514f12f32409d7

2009-09-21 23:52:13,21 C:\tmp\mtn\mtn-cat-bug
$ mtn cat -r h: example.txt  1>example-check.txt
mtn: expanding selection 'h:'
mtn: expanded to '3b2dcf8f04ccf68ef2f1959978514f12f32409d7'

2009-09-21 23:52:13,26 C:\tmp\mtn\mtn-cat-bug
$ xxd -g8 example.txt
0000000: 780d0a                             x..

2009-09-21 23:52:13,27 C:\tmp\mtn\mtn-cat-bug
$ xxd -g8 example-check.txt
0000000: 780d0d0a                           x...


Why the 0x0d (\r, CR, etc) gets doubled?

PS: Running mtn cat --debug doesn't show anything interesting.

Cheers,
-- 
Marcin W. Dabrowski





reply via email to

[Prev in Thread] Current Thread [Next in Thread]