Commits

David Golub  committed 570ddfc

overlay: don't send SHCNE_ASSOCCHANGED unless a thgstatus file was modified

  • Participants
  • Parent commits 3d7d0a3

Comments (0)

Files changed (2)

File TortoiseHgOverlayServer.py

         _stderr = sys.stderr
         sys.stderr = errorstream
         try:
+            updated_any = False
             for r in sorted(roots):
                 try:
-                    shlib.update_thgstatus(_ui, r, wait=False)
+                    if shlib.update_thgstatus(_ui, r, wait=False):
+                        updated_any = True
                     shlib.shell_notify([r], noassoc=True)
                     logger.msg('Updated ' + r)
                 except (IOError, OSError):
             notifypaths -= failedroots
             if notifypaths:
                 time.sleep(2)
-                shlib.shell_notify(list(notifypaths))
+                shlib.shell_notify(list(notifypaths), noassoc=not updated_any)
                 logger.msg('Shell notified')
             errmsg = errorstream.getvalue()
             if errmsg:

File tortoisehg/util/shlib.py

                 f.write(s + dn + '\n')
                 ui.note("%s %s\n" % (s, dn))
             f.rename()
+        return update
 
 else:
     def shell_notify(paths, noassoc=False):