changeset 909:67b27ec080ae

ignore: evaluate ignore.readpats to see if ignore module really exists Otherwise ImportError wouldn't be raised thanks to demandimport. Perhaps tests passed at e5b10a710036 because we are likely to have ignore.pyc in our mercurial tree.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 31 May 2015 13:51:42 +0900
parents b022478ae3d1
children 83c847b0b3ab
files hggit/__init__.py hggit/gitdirstate.py
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hggit/__init__.py	Thu May 28 12:44:00 2015 -0700
+++ b/hggit/__init__.py	Sun May 31 13:51:42 2015 +0900
@@ -36,6 +36,7 @@
 from mercurial import hg
 try:
     from mercurial import ignore
+    ignore.readpats
     ignoremod = True
 except ImportError:
     # The ignore module disappeared in Mercurial 3.5
--- a/hggit/gitdirstate.py	Thu May 28 12:44:00 2015 -0700
+++ b/hggit/gitdirstate.py	Sun May 31 13:51:42 2015 +0900
@@ -6,6 +6,7 @@
 from mercurial import dirstate
 try:
     from mercurial import ignore
+    ignore.readpats
     ignoremod = True
 except:
     # ignore module was removed in Mercurial 3.5