##// END OF EJS Templates
inotify: inotify.server.walk() simplify algorithm...
Nicolas Dumazet -
r8320:a1305c1c default
parent child Browse files
Show More
@@ -78,21 +78,20 b' def walk(repo, root):'
78 dirs.append(name)
78 dirs.append(name)
79 elif kind in (stat.S_IFREG, stat.S_IFLNK):
79 elif kind in (stat.S_IFREG, stat.S_IFLNK):
80 files.append((name, kind))
80 files.append((name, kind))
81
81 if reporoot or not hginside:
82 yield hginside, fullpath, dirs, files
82 yield fullpath, dirs, files
83
83
84 for subdir in dirs:
84 for subdir in dirs:
85 path = join(root, subdir)
85 path = join(root, subdir)
86 if repo.dirstate._ignore(path):
86 if repo.dirstate._ignore(path):
87 continue
87 continue
88 for result in walkit(path, False):
88 for result in walkit(path, False):
89 if not result[0]:
89 yield result
90 yield result
91 except OSError, err:
90 except OSError, err:
92 if err.errno not in walk_ignored_errors:
91 if err.errno not in walk_ignored_errors:
93 raise
92 raise
94 for result in walkit(root, root == ''):
93
95 yield result[1:]
94 return walkit(root, root == '')
96
95
97 def _explain_watch_limit(ui, repo, count):
96 def _explain_watch_limit(ui, repo, count):
98 path = '/proc/sys/fs/inotify/max_user_watches'
97 path = '/proc/sys/fs/inotify/max_user_watches'
General Comments 0
You need to be logged in to leave comments. Login now