mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
inotify: inotify.server.walk() simplify control flow
This commit is contained in:
parent
292d751d64
commit
f6419bf349
@ -69,11 +69,10 @@ def walk(repo, root):
|
||||
for name, kind in osutil.listdir(fullpath):
|
||||
if kind == stat.S_IFDIR:
|
||||
if name == '.hg':
|
||||
if reporoot:
|
||||
continue
|
||||
else:
|
||||
if not reporoot:
|
||||
return
|
||||
dirs.append(name)
|
||||
else:
|
||||
dirs.append(name)
|
||||
elif kind in (stat.S_IFREG, stat.S_IFLNK):
|
||||
files.append((name, kind))
|
||||
yield fullpath, dirs, files
|
||||
|
Loading…
Reference in New Issue
Block a user