D8261: git: hack around import checker being confused about the provenance of pygit2
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Sat Mar 7 21:45:52 UTC 2020
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
More information about the Mercurial-devel
mailing list