Problem with win32text

Michael Sperber sperber at deinprogramm.de
Fri Mar 14 03:23:42 CDT 2008


"Shun-ichi GOTO" <shunichi.goto at gmail.com> writes:

> 2008/3/13, Michael Sperber <sperber at deinprogramm.de>:
>
>> Right - I was trying to do a revert, but got told that I should have
>>  done an update.  (I was asking about "purpose", not "functionality".)
>>  So I still believe there's a bug.
>
> Can you provide script/batch-file to reproduce your issue on our platform?
> And also please show us your system wide and user's .hgrc / mercurial.ini.

Here's a shell script that demonstrates the problem.  (Works with a user
.hgrc containing only the user name.)

I see now that I really should have been more dilligent about
documenting what I did, and that I misposted---sorry about that

The problem is files that have LF line endings, not CR/LF.  This kind of
thing often happens inadvertently on Windows boxes, where many editors
are sloppy about line endings.  I'd think that "hg revert" should just
normalize to CR/LF line endings (which it does), and then should be done
with it.  However, I still see this output:

M baz

... and get an empty patch upon commit.

================
#!
hg init foo
cd foo
echo '[extensions]' > .hg/hgrc
echo 'win32text =' >> .hg/hgrc
echo '[encode]' >> .hg/hgrc
echo '** = cleverencode:' >> .hg/hgrc
echo '[decode]' >> .hg/hgrc
echo '** = cleverdecode:' >> .hg/hgrc

echo foo >> baz
echo bla >> baz
hg add baz
hg commit -m "checkin"
rm baz
hg revert baz
hg status
================

-- 
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla



More information about the Mercurial mailing list