Bug 5938 - Exception running `hg stat` using `fsmonitor.mode=paranoid`
Summary: Exception running `hg stat` using `fsmonitor.mode=paranoid`
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: fsmonitor (show other bugs)
Version: 4.6
Hardware: PC Mac OS
: wish bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-07-11 15:53 UTC by Christopher Speck
Modified: 2018-10-22 00:00 UTC (History)
2 users (show)

See Also:
Python Version: ---


Attachments
The exception (2.88 KB, text/plain)
2018-07-11 15:53 UTC, Christopher Speck
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Speck 2018-07-11 15:53 UTC
Created attachment 2013 [details]
The exception

I ran this command and got an exception (added as attachment).
  hg stat --config fsmonitor.mode=paranoid




Running hg stat normally showed no file differences. I was trying to investigate why hg stat said there's no file changes but Eclipse's HgEclipse plugin said there were. I recently turned on fsmonitor a week back and suspected there might be an issue.
Comment 1 Bugzilla 2018-08-11 00:00 UTC
Bug was set to UNCONFIRMED for 30 days, bumping
Comment 2 Bugzilla 2018-09-11 00:00 UTC
Bug was set to UNCONFIRMED for 31 days, bumping
Comment 3 Bugzilla 2018-10-12 00:00 UTC
Bug was set to UNCONFIRMED for 30 days, bumping
Comment 4 FUJIWARA Katsunori 2018-10-12 12:16 UTC
This issue occurs only if:

- fsmonitor.mode is configured as "paranoid", and
- environment variable FSMONITOR_LOG_FILE is not configured

Root cause of this issue is that "localrepo.opener" was dropped
since Mercurial 4.3 (or a7e210167c28).
Comment 5 HG Bot 2018-10-14 04:51 UTC
Fixed by https://mercurial-scm.org/repo/hg/rev/6b1a8c396b05
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
fsmonitor: use vfs instead of opener (issue5938)

"opener" of localrepository object was dropped at Mercurial 4.3 (or
a7e210167c28). "vfs" should be used instead.

wlock is required to write into a file under .hg directory.

For efficiency, we should change _cmpsets() from:

  1. acquire wlock
  2. open log file under .hg directory with write mode
  3. compare between result of watchman and Mercurial's dirstate logic
  4. write out error info into a file, if error is detected
  5. release wlock

to:

  1. compare between result of watchman and Mercurial's dirstate logic
  2. acquire wlock, if error is detected
  3. open and write error info into a file
  4. release wlock

But this is another issue.

(please test the fix)
Comment 6 Bugzilla 2018-10-22 00:00 UTC
Bug was set to TESTING for 7 days, resolving