# HG changeset patch # User Bryan O'Sullivan # Date 1447796834 28800 # Node ID f9f2f29ce023ad4e1871ac34577249b638643bd3 # Parent fa6685ea7ad8ba96080b699fc7cd27c5d446ca20 osutil: make statfiles check for interrupts periodically This is a simpler and faster fix for issue4878 than the contortions performed in 502b56a9e897. diff -r fa6685ea7ad8 -r f9f2f29ce023 mercurial/osutil.c --- a/mercurial/osutil.c Tue Nov 17 13:43:09 2015 -0800 +++ b/mercurial/osutil.c Tue Nov 17 13:47:14 2015 -0800 @@ -613,6 +613,11 @@ int ret, kind; char *path; + /* With a large file count or on a slow filesystem, + don't block signals for long (issue4878). */ + if ((i % 1000) == 999 && PyErr_CheckSignals() == -1) + goto bail; + pypath = PySequence_GetItem(names, i); if (!pypath) goto bail;