durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  hgext/git/index.py

CHANGE DETAILS

diff --git a/hgext/git/index.py b/hgext/git/index.py
--- a/hgext/git/index.py
+++ b/hgext/git/index.py
@@ -4,8 +4,6 @@
 import os
 import sqlite3
 
-import pygit2
-
 from mercurial.i18n import _
 
 from mercurial import (
@@ -15,6 +13,13 @@
     pycompat,
 )
 
+# This looks goofy, but it appeases test-check-imports which has funny
+# ideas about where this import belongs.
+try:
+    import pygit2
+except ImportError:
+    raise
+
 from . import gitutil
 
 



To: durin42, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to