monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Status including unknown files?


From: Nathaniel Smith
Subject: Re: [Monotone-devel] Status including unknown files?
Date: Fri, 23 Feb 2007 02:40:45 -0800
User-agent: Mutt/1.5.13 (2006-08-11)

On Fri, Feb 23, 2007 at 06:01:54PM +1100, William Uther wrote:
> Hi,
>   Currently mtn status doesn't list unknown files, you have to use  
> mtn ls unknown to do that.
> 
>   Is there a reason for this?  (Should I add it to the wishlist, or  
> should I add it to the FAQ explaining why not to add it to the  
> wishlist?)

Nope.  One of the things we agreed at the summit (or at least those of
still there on the last day) was that 'status' should be where you
go to find unknown and ignored files.

The basic design tradeoff that other VCSes have made here is that
those that value UI over speed (e.g. darcs) list unknown files here,
and those that value speed over UI (e.g. hg) do not (because scanning
for unknown files is quite an expensive operation, you have to call
readdir() on everything).

The solution is to have an extra-fancy stat cache, that also stores
stat information for directories, and their full file listings.  The
trick is that a directory's mtime changes whenever a file is added or
removed.  It's a little complex to code up and no-one's done it, but
it should be possible to be both useful and speedy here...

So possibly status should not list unknown files by _default_ until we
have such a fancy cache.  That doesn't stop us adding 'mtn status
--unknown' in the mean time.  (And similarly 'mtn status --ignored'.
And 'mtn status' should probably always have some sort of threshold,
where if there are more then say 3 unknown files it doesn't list them,
but rather says "Plus 12 unknown files, use mtn status --unknown to
list", to avoid always spamming people that don't want to think about
maintaining a good ignore list.)

-- Nathaniel

-- 
In mathematics, it's not enough to read the words
you have to hear the music




reply via email to

[Prev in Thread] Current Thread [Next in Thread]