Patchwork D7207: fsmonitor: access repo.root

login
register
mail settings
Submitter phabricator
Date Nov. 2, 2019, 10:04 p.m.
Message ID <differential-rev-PHID-DREV-ilk6uniek6kp2rfimfzt-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42690/
State Superseded
Headers show

Comments

phabricator - Nov. 2, 2019, 10:04 p.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  There is no repo._root. It looks like fsmonitor has
  been busted since this access was introduced in
  ab1900323b1 <https://phab.mercurial-scm.org/rHGab1900323b1d334a4211669cc6f483413b625013> in July 2019!

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D7207

AFFECTED FILES
  hgext/fsmonitor/__init__.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel
phabricator - Nov. 2, 2019, 10:07 p.m.
indygreg added a comment.
indygreg added a subscriber: durin42.


  @durin42 if you don't want to take this entire series for stable, this patch should be taken because it unborks fsmonitor.
  
  In related news, apparently we don't have meaningful test coverage that watchman integration is actually working, ugh.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7207/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7207

To: indygreg, #hg-reviewers
Cc: durin42, mercurial-devel

Patch

diff --git a/hgext/fsmonitor/__init__.py b/hgext/fsmonitor/__init__.py
--- a/hgext/fsmonitor/__init__.py
+++ b/hgext/fsmonitor/__init__.py
@@ -927,7 +927,7 @@ 
             return
 
         try:
-            client = watchmanclient.client(repo.ui, repo._root)
+            client = watchmanclient.client(repo.ui, repo.root)
         except Exception as ex:
             _handleunavailable(ui, fsmonitorstate, ex)
             return