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 modified. Manual comparison doesn't show any changes in code, line breaks are also equal. Reverting of these "fantom" files causes no result. There a two way how we deal with this problem:
It's really annoying to do this every day (twice ...three times... per day), especially on large changeset! Please help to find a reason of the problem.
To revert a file to a specific changeset, use hg revert -r CHANGESET FILENAME . This will revert the file without committing it.
hg revert changes the file content only and leaves the working copy parent revision alone. You typically use hg revert when you decide that you don't want to keep the uncommited changes you've made to a file in your working copy.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With