On 12.07.2009 17:33, Adrian Buehlmann wrote:
> # HG changeset patch
> # User Adrian Buehlmann <adr...@cadifra.com>
> # 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;

I should factor out this change (last = cur) into a separate patch, as this is 
unrelated
to the @@noicons feature.

The added "last = cur;" statement is just an optimization.

(this slipped through into this patch here)

>                  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
Tortoisehg-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to