[issue1790] dirstate entry locked into unset if file mtime is set into the future
Adrian Buehlmann
mercurial-bugs at selenic.com
Tue Aug 11 13:00:23 UTC 2009
New submission from Adrian Buehlmann <adrian at cadifra.com>:
I did the following on Windows XP, using mercurial 1.3.1 (starting with an
empty dir):
> echo bla >x.txt
> hg init
> hg add
adding x.txt
> hg ci -m1
> hg debugstate
n 666 6 2009-08-11 14:03:54 x.txt
Now let's set the mtime of x.txt into the future:
> touch -t 201701011200 x.txt
So far, 'hg debugstate' isn't impressed by that:
> hg debugstate
n 666 6 2009-08-11 14:03:54 x.txt
But now, doing a 'hg status' sets the entry of the file in the dirstate [1]
to the 'unset' state (which is causing troubles for dirstate readers, as
noted further down):
> hg status
> hg debugstate
n 0 -1 unset x.txt
Normally, calling 'hg status' fixes 'unset' entries in the dirstate. But not
if the file mtime is in the future! So, another 'hg status' call doesn't
help either:
> hg status
> hg debugstate
n 0 -1 unset x.txt
We are locked in! (until the system clock reaches that future date, at which
point another 'hg status' may then eventually clean out that 'unset' entry)
This is causing troubles with dirstate reading Windows explorer "shell"
extension of TortoiseHg. Current reaction of current released TortoiseHg
0.8.1 is an endless refresh loop [2].
Sure, we most likely need to harden TortoiseHg against this odd case, but...
Could this be somehow improved on the mercurial side?
[1] http://mercurial.selenic.com/wiki/DirState
[2] http://bitbucket.org/tortoisehg/stable/issue/480/endless-refresh-status-
loop
----------
messages: 10313
nosy: abuehl, sborho
priority: wish
status: unread
title: dirstate entry locked into unset if file mtime is set into the future
topic: windows
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1790>
____________________________________________________
More information about the Mercurial-devel
mailing list