# HG changeset patch # User Nicolas Dumazet # Date 1241424419 -32400 # Node ID ec985dcfd7da64960c3a6908f948b1eef0c67175 # Parent a1305c1c8d8e51fa1e8d6e7d75fbbbfb6b4f0753 inotify: inotify.server.walkrepodirs() simplify compute string concatenation only once diff -r a1305c1c8d8e -r ec985dcfd7da 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