monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] non-recursive add considered harmful


From: Nathaniel Smith
Subject: Re: [Monotone-devel] non-recursive add considered harmful
Date: Sat, 17 Mar 2007 17:14:01 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Mar 17, 2007 at 12:05:17PM +0100, Markus Schiltknecht wrote:
> Hmm... I've read through the archives (especially the thread at [1]) and 
> thought about this issue. Before continuing on debating on recursiveness 
> of our commands, I'd like to distinguish between recursing into known 
> and recursing into unknown directories. Let's see what we currently (as 
> of 0.33) have:

Thanks for collecting all this!  I just have a few more comments:

> These three inconsistencies (plus my gut feeling) are the main reasons, 
> I'm voting for making all these commands recursive by default. Including 
> 'mtn add', 'mtn drop' and 'mtn ls unknown'.

We've also previously agreed that almost all uses for 'ls unknown'
are to get a quick idea what files you may have forgotten to add, and
as such it should be moved into 'mtn status'.  Since at that point we
_know_ that it is directly for user's consumption, we should probably
make the output somewhat smart, for instance:

  $ mtn st
  ...
  Unknown files:
    'foo.cc'
    'bar.cc'

  $ mtn st
  ...
  Unknown files:
    'foo.cc'
    'bar.cc'
    'baz.cc'

  $ mtn st
  ...
  Unknown files:
    'foo.cc'
    'bar.cc'
    (and 3 others, use 'mtn status --unknown' for complete list)

  $ mtn st
  ...
  Unknown files:
    'foo.cc'
    'widgets/bar' (and 4 children)
    'baz.cc'

I.e., attempting to compress the output by summarizing children of
unknown directories and putting an upper cap on how many lines the
list will take up, unless the user requested an exhaustive list.

So the point is mostly for anyone who thinks that everything Markus
says is great, except they just can't bear to make ls unknown
recursive -- we can (and should) make status give you the benefits of
a non-recursive ls unknown, but without making things inconsistent.

> However, 
> especially for automation purpose, we probably need to add a '--depth' 
> argument, or at least a '--non-recursive'.

Please no --depth :-).

Unfortunately, the prior art for '--non-recursive' is to call it '-d'.
Oops.  We might want to have an alias '--directory', though, to match
ls.

> Derek's complaint [1] about 'mtn ls unknown' showing so many files lead 
> to making 'mtn ls unknown' non-recursive. But I'd argue that this should 
> better be handled by .mtn-ignore. Additionally, I'd like to point out, 
> that letting monotone handle the home directory is a little bit a 
> special case. Most people use monotone to handle source trees, where you 
> normally don't have so many unknown files.

Plus moving that info to 'mtn status' makes the issue irrelevant
anyway.

-- Nathaniel

-- 
Eternity is very long, especially towards the end.
  -- Woody Allen




reply via email to

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