[issue1073] dirstate is silently broken by global encode setting

Shun-ichi Goto mercurial-bugs at selenic.com
Thu Apr 3 06:10:04 CDT 2008


New submission from Shun-ichi Goto <shunichi.goto at gmail.com>:

As CRLF related issue, I've encounted a strange behaviour of dirstate on cloning.
I'm usually enabling win32text.encode (and without decode) globaly.
When I cloned a repository of AsciiDoc, 'hg clone' succeeded without any
error or warning, but 'hg status' reports some files are 'modified'.
'hg revert -a' and 'hg update -C' does not resolve this.
Also 'rm xxx && hg up' does not.
If I cloned without global 'encode' setting, it's ok.
It seems that encode setting is used in somewhere of cloning process.
Those files seem to have CRLF line ending in repository, but
why 'encode' is used on cloning? Why no warning is displayed?

Here is my play log (it is reproducable):

# now [encode] **=cleverencode:
[c:\develop]hg clone http://hg.sharesource.org/asciidoc/ a
requesting all changes
adding changesets
adding manifests
adding file changes
added 67 changesets with 282 changes to 154 files
updating working directory
141 files updated, 0 files merged, 0 files removed, 0 files unresolved

[c:\develop]cd a

[c:\develop\a]hg st
M latex.conf
M linuxdoc.conf
M stylesheets\docbook-xsl.css
M text.conf
M xhtml-deprecated-css.conf
M xhtml-deprecated.conf
M xhtml11-quirks.conf
M xhtml11.conf

[c:\develop\a]hg debugstate | grep xhtml
n 666        661 2008-04-03 19:42:45 docbook-xsl/xhtml.xsl
n 666         37 2008-04-03 19:42:45 examples/website/xhtml11-manpage.css
n 666         36 2008-04-03 19:42:45 examples/website/xhtml11-quirks.css
n 666         29 2008-04-03 19:42:45 examples/website/xhtml11.css
n 666        357 2008-04-03 19:42:46 stylesheets/xhtml-deprecated-manpage.css
n 666       5387 2008-04-03 19:42:46 stylesheets/xhtml-deprecated.css
n 666        275 2008-04-03 19:42:46 stylesheets/xhtml11-manpage.css
n 666        631 2008-04-03 19:42:46 stylesheets/xhtml11-quirks.css
n 666       4016 2008-04-03 19:42:46 stylesheets/xhtml11.css
n   0         -1 unset               xhtml-deprecated-css.conf
n   0         -1 unset               xhtml-deprecated.conf
n   0         -1 unset               xhtml11-quirks.conf
n   0         -1 unset               xhtml11.conf

[c:\develop\a]edit ~/.hgrc     # edit to disable 'encode'ing

[c:\develop\a]hg st            # all files are good, not modified

[c:\develop\a]hg debugstate | grep xhtml   # dirstate is updated
n 666        661 2008-04-03 19:42:45 docbook-xsl/xhtml.xsl
n 666         37 2008-04-03 19:42:45 examples/website/xhtml11-manpage.css
n 666         36 2008-04-03 19:42:45 examples/website/xhtml11-quirks.css
n 666         29 2008-04-03 19:42:45 examples/website/xhtml11.css
n 666        357 2008-04-03 19:42:46 stylesheets/xhtml-deprecated-manpage.css
n 666       5387 2008-04-03 19:42:46 stylesheets/xhtml-deprecated.css
n 666        275 2008-04-03 19:42:46 stylesheets/xhtml11-manpage.css
n 666        631 2008-04-03 19:42:46 stylesheets/xhtml11-quirks.css
n 666       4016 2008-04-03 19:42:46 stylesheets/xhtml11.css
n 666       6360 2008-04-03 19:42:46 xhtml-deprecated-css.conf
n 666       7693 2008-04-03 19:42:46 xhtml-deprecated.conf
n 666       1160 2008-04-03 19:42:46 xhtml11-quirks.conf
n 666      13971 2008-04-03 19:42:46 xhtml11.conf

[c:\develop\a]edit ~/.hgrc     # edit to enable 'encode' again

[c:\develop\a]hg st            # alright, dirstate seems to be updated.

[c:\develop\a]

----------
messages: 5812
nosy: gotoh
priority: bug
status: unread
title: dirstate is silently broken by global encode setting

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1073>
____________________________________________________



More information about the Mercurial-devel mailing list