monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] restrictions: disabling recursion


From: Derek Scherger
Subject: Re: [Monotone-devel] restrictions: disabling recursion
Date: Sun, 02 Mar 2008 11:18:25 -0700
User-agent: Thunderbird 2.0.0.9 (X11/20071116)

Zack Weinberg wrote:
2008/2/19 Zbigniew Zagórski <address@hidden>:
 while fighting with my first lua test (for automate
 get_current_revision) I've found that restrictions are rather
 surprising when using --depth=0 command. Reference says that

 "... For example, n=0 disables recursion ..."

 and i think that it's not absolutely true.

You've run afoul of this, I think:

  // FIXME: this uses depth+1 because the old semantics of depth=0 were
  // something like "the current directory and its immediate children". it
  // seems somewhat more reasonable here to use depth=0 to mean "exactly
  // this directory" and depth=1 to mean "this directory and its immediate
  // children"

The "old" behavior has been preserved in the name of backward
compatibility.  I'd have no objection to calling a flag day and
introducing the more sensible semantics you suggest (which are the
same as the ones suggested in the restrictions.cc comments).  What do
other people think?

Being as there were no objections I've gone ahead and made this change in rev 4c17e37f16638c21205bf99d008d1b94ab052fbb on mainline.

I did notice that the ls certs, keys, branches, epochs, tags, and vars commands all take --depth and --exclude as valid options which seems odd. I don't think these options make any sense at all for these commands and the manual doesn't indicate that they do.

Cheers,
Derek






reply via email to

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