Patchwork D10733: hghave: make error output easier to diagnose

login
register
mail settings
Submitter phabricator
Date May 18, 2021, 5:55 p.m.
Message ID <differential-rev-PHID-DREV-3yqt74nuxmoivn4iyheo-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49052/
State Superseded
Headers show

Comments

phabricator - May 18, 2021, 5:55 p.m.
durin42 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  I had a typo that meant the new bash check was throwing an exception
  (due to a missing argument), but it was very hard to diagnose without
  this change.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




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

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -104,8 +104,8 @@ 
         check, desc = checks[feature]
         try:
             available = check()
-        except Exception:
-            result['error'].append('hghave check failed: %s' % feature)
+        except Exception as e:
+            result['error'].append('hghave check %s failed: %r' % (feature, e))
             continue
 
         if not negate and not available: