Zack Weinberg wrote:
2008/2/19 Zbigniew Zagórski <[EMAIL PROTECTED]>:
 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?

+1

I think the "old" behaviour refers to the time before monotone explicitly supported directories. Perhaps depth=0 meaning all the versioned files in some explicitly specified directory made more sense then.

I don't think there's any need to expose -1 to mean infinite recursion though is there? Not specifying depth already means this.

Cheers,
Derek





_______________________________________________
Monotone-devel mailing list
Monotone-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/monotone-devel

Reply via email to