On Fri, Apr 24, 2009 at 4:10 AM, Adrian Buehlmann <[email protected]> wrote:
> On 24.04.2009 04:33, Steve Borho wrote:
>> On Thu, Apr 23, 2009 at 5:34 PM, Adrian Buehlmann <[email protected]> wrote:
>>> On 23.04.2009 23:10, Adrian Buehlmann wrote:
>>>> On 23.04.2009 02:42, TK Soh wrote:
>>>>> Just a thought. If Adrian can get the folders to show the overlay
>>>>> icons quickly, perhaps we can slot in this overlay icons extension,
>>>>> while waiting for or in case we can't get the 'official' C++ shellext
>>>>> ready for 0.8.
>>>> (1)
>>>> Overlay icons on folders currently looks like a harder nut to me, so don't
>>>> expect anything quickly (if at all). I might play with it if I'm bored 
>>>> enough
>>>> (and not distracted by other -- non Mercurial -- stuff popping up).
>>> Oh, wait.
>>>
>>> http://bitbucket.org/bfrog/cutehg-crew/src/fe85ceaf5084/win32/shellext/dirstate.c#cl-263
>>>
>>> looks very cute indeed. Nice work by Benjamin Pollack.
>>>
>>> For directories, he just iterates over all dirstate entries as well, 
>>> matching part of
>>> the path and seeing if there is an added / modified file inside.
>>>
>>> Add wins over modified.
>>
>> FWIW.  The latest overlay code on crew keeps a mask of bits so we can
>> paint both the added and modified (and possibly other) overlays on
>> folders.  This seems a feature we want to keep.
>
> Oh. Hmmm.
>
>>> That should give nearly the same speed for directories as for the files 
>>> alone,
>>> I suspect.
>>
>> Since the file is sorted, you basically just need to keep reading
>> until you exit the folder.
>
> dirstate.dirstate.write doesn't look like it would write the entries
> sorted:
>
> http://hg.intevation.org/mercurial/crew/file/ddbee2d0d634/mercurial/dirstate.py#l367
>  :
>
> <snip>
>        for f, e in self._map.iteritems():
>            if f in copymap:
>                f = "%s\0%s" % (f, copymap[f])
>            if e[3] > limit and e[0] == 'n':
>                e = (e[0], 0, -1, -1)
>            e = pack(_format, e[0], e[1], e[2], e[3], len(f))
>            write(e)
>            write(f)
> </snip>
>
> ?
>
> __iter__(self) does, but that's not used when writing, no?

Hmm.. I was going by what I was told by bos ages ago, that the file
was sorted so they could do binary searches and that it worked really
well.  Perhaps he was talking about a different internal file, maybe
the manifest.

--
Steve Borho

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to