Patchwork D322: fsmonitor: correct an error message

login
register
mail settings
Submitter phabricator
Date Aug. 10, 2017, 4:38 p.m.
Message ID <differential-rev-PHID-DREV-phgsilwtnt3qtfn7vv2h-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/22833/
State Superseded
Headers show

Comments

phabricator - Aug. 10, 2017, 4:38 p.m.
quark created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Without the change, the error looks like:
  
    warning: Watchman unavailable: "watchman" executable not in PATH (%s),
    while executing [Errno 2] No such file or directory
  
  With the change, it now looks like:
  
    warning: Watchman unavailable: "watchman" executable not in PATH
    ([Errno 2] No such file or directory)

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/fsmonitor/pywatchman/__init__.py

CHANGE DETAILS




To: quark, #hg-reviewers
Cc: mercurial-devel
phabricator - Aug. 10, 2017, 5:30 p.m.
lothiraldan accepted this revision.
lothiraldan added a comment.


  LGTM, we don't have a test for it?

REPOSITORY
  rHG Mercurial

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

To: quark, #hg-reviewers, lothiraldan
Cc: lothiraldan, mercurial-devel

Patch

diff --git a/hgext/fsmonitor/pywatchman/__init__.py b/hgext/fsmonitor/pywatchman/__init__.py
--- a/hgext/fsmonitor/pywatchman/__init__.py
+++ b/hgext/fsmonitor/pywatchman/__init__.py
@@ -825,7 +825,7 @@ 
             p = subprocess.Popen(cmd, **args)
 
         except OSError as e:
-            raise WatchmanError('"watchman" executable not in PATH (%s)', e)
+            raise WatchmanError('"watchman" executable not in PATH (%s)' % e)
 
         stdout, stderr = p.communicate()
         exitcode = p.poll()