Mercurial > hg-stable
changeset 26983:f9f2f29ce023
osutil: make statfiles check for interrupts periodically
This is a simpler and faster fix for issue4878 than the contortions
performed in 502b56a9e897.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 17 Nov 2015 13:47:14 -0800 |
parents | fa6685ea7ad8 |
children | af2663680e95 |
files | mercurial/osutil.c |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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;