monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Problems with LF -> CRLF conversion under Windows


From: Maquelin, Olivier
Subject: [Monotone-devel] Problems with LF -> CRLF conversion under Windows
Date: Fri, 15 Apr 2005 16:43:48 -0700

Been experimenting with Monotone version 0.18 under Windows. After updating to another revision, file contents suddenly disappeared (Scary!). After a bit of experimentation I found out that the contents could be recovered by disabling LF -> CRLF translation (Good, so at least I didn't loose any data...). Here is the info on how to reproduce the issue:

Using the following definitions for .monotonerc:

function get_passphrase(keypair_id)
    return "sekret"
end

function get_linesep_conv(name)
    return {"LF", "CRLF"}
end


Here are the commands to reproduce the issue:

C:\mt_test>monotone db init --db=mt.db

C:\mt_test>monotone --db=mt.db genkey address@hidden
monotone: generating key-pair 'address@hidden'
enter passphrase for key ID address@hidden: <sekret>
confirm passphrase for key ID address@hidden: <sekret>
monotone: storing key-pair 'address@hidden' in database

C:\mt_test>monotone setup test

C:\mt_test>cd test

C:\mt_test\test>echo foo >foo.txt

C:\mt_test\test>monotone add .
monotone: adding foo.txt to working copy add set

C:\mt_test\test>monotone commit --db=c:\mt_test\mt.db --branch=xyz.mt_test --message="foo"
monotone: beginning commit on branch 'xyz.mt_test'
monotone: committed revision 651e6d1da7e49201f5f3d4fe2123daf05b31ff21

C:\mt_test\test>cat foo.txt
foo

C:\mt_test\test>echo foo >>foo.txt

C:\mt_test\test>monotone commit --message="foo foo"
monotone: beginning commit on branch 'xyz.mt_test'
monotone: committed revision 7ae63b0ec1fabb9457fb6af89ca4d8ec73cb7214

C:\mt_test\test>cat foo.txt
foo
foo

C:\mt_test\test>monotone update 651e6d1da7e49201f5f3d4fe2123daf05b31ff21
monotone: selected update target 651e6d1da7e49201f5f3d4fe2123daf05b31ff21
monotone: updating foo.txt to 48fe3792c015a5cc0c6c330b1f9548a60366bfab
monotone: updated to base revision 651e6d1da7e49201f5f3d4fe2123daf05b31ff21

C:\mt_test\test>cat foo.txt


C:\mt_test\test>


As you can see, the last 'cat foo.txt' prints an empty file! At this point it is possible to recover the contents by modifying .monotonerc to disable LF -> CRLF translation, but of course the resulting file then uses LF for line termination.

Is it just me or what? Unless this is fixed I don't see how I could use Monotone in a Linux/Windows mixed environment.

-- Olivier


reply via email to

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