Mercurial marks unmodified files as modified in working directory and fails to revert

前端 未结 1 949
眼角桃花
眼角桃花 2020-12-07 01:45

Our team uses TortoisHg 2.0.5 on Windows and after refreshing file list in working directory it sometimes (at least once a day :(( ) shows a list of unmodified files as modi

相关标签:
1条回答
  • 2020-12-07 02:23

    The first question is, are you working exclusively on Windows, and if so, are you sure you need the eol extension?

    As for the problem you're seeing, from this series of emails, it looks like the eol extension uses LF as its default repository encoding, which probably makes Mercurial think your created-on-Windows, CRLF-ending files have changed. To change this, add the following section to your .hgeol file:

    [repository]
    native = CRLF
    

    I tried the following test, similar to the one in my link (with eol extension enabled):

    > hg init eols
    > cd eols
    # used notepad++ to save a test file "foo" with Windows line endings (CRLF)
    > hg commit -Am "added foo with CRLF"
    > hg status
    > echo [patterns] > .hgeol
    > echo ** = native >> .hgeol
    > hg status
      M foo       # spurious difference!
      ? .hgeol
    > echo [repository] >> .hgeol
    > echo native = CRLF >> .hgeol
    > hg status
      ? .hgeol
    
    0 讨论(0)
提交回复
热议问题