Patchwork import-checker: add hgdemandimport to local modules

login
register
mail settings
Submitter Siddharth Agarwal
Date June 1, 2017, 3:07 a.m.
Message ID <884f32a63e57d5d7ff3f.1496286443@devvm31800.prn1.facebook.com>
Download mbox | patch
Permalink /patch/21114/
State Accepted
Headers show

Comments

Siddharth Agarwal - June 1, 2017, 3:07 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1496286428 25200
#      Wed May 31 20:07:08 2017 -0700
# Node ID 884f32a63e57d5d7ff3fce3d5b6b99c84df8309d
# Parent  bd3d33c6014f4553c799c0d3236e17b28ffc85e3
import-checker: add hgdemandimport to local modules

This fixes test-check-module-imports.t.
Sean Farley - June 1, 2017, 3:18 a.m.
Siddharth Agarwal <sid0@fb.com> writes:

> # HG changeset patch
> # User Siddharth Agarwal <sid0@fb.com>
> # Date 1496286428 25200
> #      Wed May 31 20:07:08 2017 -0700
> # Node ID 884f32a63e57d5d7ff3fce3d5b6b99c84df8309d
> # Parent  bd3d33c6014f4553c799c0d3236e17b28ffc85e3
> import-checker: add hgdemandimport to local modules
>
> This fixes test-check-module-imports.t.

Ah, nice, queued!

Patch

diff --git a/contrib/import-checker.py b/contrib/import-checker.py
--- a/contrib/import-checker.py
+++ b/contrib/import-checker.py
@@ -244,7 +244,8 @@  def list_stdlib_modules():
         for top, dirs, files in os.walk(libpath):
             for i, d in reversed(list(enumerate(dirs))):
                 if (not os.path.exists(os.path.join(top, d, '__init__.py'))
-                    or top == libpath and d in ('hgext', 'mercurial')):
+                    or top == libpath and d in ('hgdemandimport', 'hgext',
+                                                'mercurial')):
                     del dirs[i]
             for name in files:
                 if not name.endswith(('.py', '.so', '.pyc', '.pyo', '.pyd')):