contrib/import-checker.py
changeset 22974 6bd43614d387
parent 20391 466e4c574db0
child 22975 461342e1c8aa
equal deleted inserted replaced
22973:bcff9ecdaae0 22974:6bd43614d387
   167         path = []
   167         path = []
   168     if ignore is None:
   168     if ignore is None:
   169         ignore = []
   169         ignore = []
   170     path = path + [mod]
   170     path = path + [mod]
   171     for i in sorted(imports.get(mod, [])):
   171     for i in sorted(imports.get(mod, [])):
   172         if i not in stdlib_modules:
   172         if i not in stdlib_modules and not i.startswith('mercurial.'):
   173             i = mod.rsplit('.', 1)[0] + '.' + i
   173             i = mod.rsplit('.', 1)[0] + '.' + i
   174         if i in path:
   174         if i in path:
   175             firstspot = path.index(i)
   175             firstspot = path.index(i)
   176             cycle = path[firstspot:] + [i]
   176             cycle = path[firstspot:] + [i]
   177             if cyclekey(cycle) not in ignore:
   177             if cyclekey(cycle) not in ignore: