debugging demandimport

Matt Mackall mpm at selenic.com
Mon Mar 9 11:30:46 CDT 2009


On Sun, 2009-03-08 at 20:51 -0500, Steve Borho wrote:
> (on Windows, python-2.5.1)
> 
> This two-line python script works as documented:
> 
> from win32com.shell import shell
> shell.SHGetSpecialFolderPath(0, 12)
> 
> This script segfaults:
> 
> from mercurial import demandimport
> demandimport.enable()
> from win32com.shell import shell
> shell.SHGetSpecialFolderPath(0, 12)
> 
> If I add 'win32com.shell' or 'win32com' to the
> demandimport ignore list, it crashes one line earlier
> when in the import statement.
> 
> How does one attack this?

Add a print statement in demandimport to get a list of imported modules,
then bisect.

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial-devel mailing list