Joel Reed wrote:
> (%:~/tmp/root) monotone --db=../mt.db --depth=1 ls known .
> file
> 
> (%:~/tmp/root) monotone --db=../mt.db --depth=2 ls known . 
> a/file
> file
> 
> (%:~/tmp/root) monotone --db=../mt.db --depth=3 ls known . 
> a/b/file
> a/file
> file

I'm not sure if ls known is considered a working copy command but you
probably don't need the --db setting after the first time.

> This gives me what I need. When no --depth is provided "." works as
> before. Giving the whole subtree from that point.
> 
> A few questions:
> 
> 1) functionality look ok?

looks ok to me, and yeah, it's certainly a nice small patch, good work!

> 2) --depth as param name ok?

not sure. I wonder if simply --local or --nonrecursive would be better
so that --depth can always mean ancestry depth. no major objection to
--depth though. also, I wonder whether --depth=0 means current dir and
--depth=1 means one level deeper? that would have been what I expect,
but I don't know what find's --depth semantics are off the top of my head.

> 3) patch look ok (-testcase & Changelog!)

personally I'd prefer 'if (depth != -1)' over 'if (-1 != depth)'.

> 4) I want to add this to "list" obviously, but any other subcommands
>        you'd nominate for working with this option? (must be something
>        that uses restriction code!)

my vote would be for all restrictable commands to take the option. so
status, diff, commit, revert, ls unknown/ignored/missing and any others.
it appears that all you need to do is enable the option for them so it
seems easy enough to add.

Cheers,
Derek



_______________________________________________
Monotone-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to