inotify: inotify.server.walkrepodirs() simplify
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Mon, 04 May 2009 17:06:59 +0900
changeset 8321 ec985dcfd7da
parent 8320 a1305c1c8d8e
child 8322 3c6c21eb3416
inotify: inotify.server.walkrepodirs() simplify compute string concatenation only once
hgext/inotify/server.py
--- a/hgext/inotify/server.py	Mon May 04 16:57:52 2009 +0900
+++ b/hgext/inotify/server.py	Mon May 04 17:06:59 2009 +0900
@@ -33,9 +33,10 @@
     Exclude the .hg directory, any nested repos, and ignored dirs.'''
     rootslash = repo.root + os.sep
     def walkit(dirname, top):
+        fullpath = rootslash + dirname
         hginside = False
         try:
-            for name, kind in osutil.listdir(rootslash + dirname):
+            for name, kind in osutil.listdir(fullpath):
                 if kind == stat.S_IFDIR:
                     if name == '.hg':
                         hginside = True
@@ -50,7 +51,7 @@
         except OSError, err:
             if err.errno not in walk_ignored_errors:
                 raise
-        yield rootslash + dirname, hginside
+        yield fullpath, hginside
     for dirname, hginside in walkit('', True):
         yield dirname