avoiding scans of whole directory tree

Adrian Buehlmann adrian at cadifra.com
Wed May 28 07:04:23 CDT 2008


On 28.05.2008 13:39, Jamie Webb wrote:
> On 2008-05-28 10:01:44 Adrian Buehlmann wrote:
>> On 28.05.2008 09:52, Mohit Aron wrote:
>>> On Wed, May 28, 2008 at 12:47 AM, Adrian Buehlmann
>>> <adrian at cadifra.com <mailto:adrian at cadifra.com>> wrote:
>>>
>>>     On 28.05.2008 09:34, Mohit Aron wrote:
>>>     > Hello,
>>>     >
>>>     > commands like 'hg status' scan the full workspace to detect
>>>     > what's changed.
>>>
>>>     That's incorrect. See DirState on the wiki
>>>
>>> How does that prevent a full namespace scan ? I understand that it
>>> saves mercurial from actually having to read the data of all files.
>>> It does need to read the metadata though - which is a killer if
>>> there are lots and lots of files. Even worse if the workspace is on
>>> NFS.
>> Why is it a "killer"?
> 
> I tried to use hg to manage '/' once. I gave up, because even 'hg
> commit' scans the entire workspace, even if few files have been added.
> I used git instead.

And how does git solve the problem? By using the equivalent of that
proposed "hg edit" command?

(sorry, I don't know using git)

> (In case you're going to try to tell me this was a bad idea, no it's
> not. This is for a fairly specialised server appliance setup, where I
> want to keep a very tight control of how the system changes.)

I don't tell you anything. I just try to understand why that
"hg edit" command Mohit is proposing should be needed.

Besides, I know of no plans to implement a "hg edit".

BTW, On Linux, there is the InotifyExtension (see wiki) and for
Windows there was a GSoC project idea that might be of interest
("Instantaneous status on Windows, OS X", see SummerOfCode on wiki).





More information about the Mercurial mailing list