##// END OF EJS Templates
inotify: inotify.server.walkrepodirs() simplify...
Nicolas Dumazet -
r8321:ec985dcf default
parent child Browse files
Show More
@@ -33,9 +33,10 b' def walkrepodirs(repo):'
33 Exclude the .hg directory, any nested repos, and ignored dirs.'''
33 Exclude the .hg directory, any nested repos, and ignored dirs.'''
34 rootslash = repo.root + os.sep
34 rootslash = repo.root + os.sep
35 def walkit(dirname, top):
35 def walkit(dirname, top):
36 fullpath = rootslash + dirname
36 hginside = False
37 hginside = False
37 try:
38 try:
38 for name, kind in osutil.listdir(rootslash + dirname):
39 for name, kind in osutil.listdir(fullpath):
39 if kind == stat.S_IFDIR:
40 if kind == stat.S_IFDIR:
40 if name == '.hg':
41 if name == '.hg':
41 hginside = True
42 hginside = True
@@ -50,7 +51,7 b' def walkrepodirs(repo):'
50 except OSError, err:
51 except OSError, err:
51 if err.errno not in walk_ignored_errors:
52 if err.errno not in walk_ignored_errors:
52 raise
53 raise
53 yield rootslash + dirname, hginside
54 yield fullpath, hginside
54 for dirname, hginside in walkit('', True):
55 for dirname, hginside in walkit('', True):
55 yield dirname
56 yield dirname
56
57
General Comments 0
You need to be logged in to leave comments. Login now