# HG changeset patch
# User Adrian Buehlmann <[email protected]>
# Date 1247411546 -7200
# Node ID 8c9ba6c7eb26d372357640dbf812ca7a3f1531b3
# Parent  935f8fa4a4d47c39b2254a28cf5c994b859f9ad8
shellext: show no overlay icons if .hg/thgstatus contains '@@noicons'

diff --git a/win32/shellext/QueryDirstate.cpp b/win32/shellext/QueryDirstate.cpp
--- a/win32/shellext/QueryDirstate.cpp
+++ b/win32/shellext/QueryDirstate.cpp
@@ -175,17 +175,26 @@ int HgQueryDirstate(
             relpath[i] = '/';
     }
 
+    DirectoryStatus* pdirsta = DirectoryStatus::get(cur.hgroot, cur.basedir);
+    if (pdirsta && pdirsta->noicons())
+    {
+        last = cur;
+        return 0;
+    }
+
     if (cur.isdir)
     {
         if (!relpath.empty())
         {
             Dirstate* pds2 = Dirstatecache::get(cur.hgroot, cur.basedir);
             if (pds2 && !pds2->root().getdir(relpath))
+            {
+                last = cur;
                 return 0;  // unknown dir -> no icon
+            }
         }
 
-        DirectoryStatus* pds = DirectoryStatus::get(cur.hgroot, cur.basedir);
-        outStatus = (pds ? pds->status(relpath) : '?');
+        outStatus = (pdirsta ? pdirsta->status(relpath) : '?');
     }
     else
     {

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to