Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7.3, 0.7.4, and 0.7.5

0.7.3 shlib: only send one shell notification per directory

This should improve the performance and possibly robustness
of large repository operations. It should not adversely effect
the shell overlays since it will get fewer refresh events and the
overlay code is already optimized to re-read entire directories.

Changeset 5215e780e916

Parent 7e3488848e2c

by Steve Borho

Changes to one file · Browse files at 5215e780e916 Showing diff from parent 7e3488848e2c Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​shlib.py Stacked
 
171
172
173
 
174
175
176
 
 
 
 
 
 
 
 
177
178
179
 
171
172
173
174
175
176
 
177
178
179
180
181
182
183
184
185
186
187
@@ -171,9 +171,17 @@
  from win32com.shell import shell, shellcon   except ImportError:   return + dirs = []   for path in paths:   abspath = os.path.abspath(path) - pidl, ignore = shell.SHILCreateFromPath(abspath, 0) + if not os.path.isdir(abspath): + abspath = os.path.dirname(abspath) + if abspath not in dirs: + dirs.append(abspath) + # send notifications to deepest directories first + dirs.sort(lambda x, y: len(y) - len(x)) + for dir in dirs: + pidl, ignore = shell.SHILCreateFromPath(dir, 0)   if pidl is None:   continue   shell.SHChangeNotify(shellcon.SHCNE_UPDATEITEM,