You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by David Glasser <gl...@davidglasser.net> on 2008/04/03 03:44:44 UTC

Re: svn commit: r30205 - trunk/notes

On Wed, Apr 2, 2008 at 3:37 PM,  <kf...@tigris.org> wrote:
> Author: kfogel
>  Date: Wed Apr  2 15:37:52 2008
>  New Revision: 30205
>
>  Log:
>  * notes/sparse-directories.txt: Bring up to date.


>     On the client side, most of the svn_client.h interfaces that
>  -   formerly took 'svn_boolean_t recurse' now take 'svn_depth_t depth'.
>  -   (The -N option is deprecated, but it still works: it simply maps to
>  -   --depth=files, which results in the same behavior as -N used to.)
>  +   formerly took 'svn_boolean_t recurse' have been revved and their
>  +   successors take 'svn_depth_t depth' instead.  (The -N option is
>  +   deprecated, but it still works: it simply maps to --depth=files,
>  +   which results in the same behavior as -N used to.)

Isn't it actually "-N maps to --depth=files, empty, or immediates,
depending on context, for compatibility"?  (I think it's immediates
for status, empty for revert and add, and files for everything else,
or something.)

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r30205 - trunk/notes

Posted by David Glasser <gl...@davidglasser.net>.
On Fri, Apr 4, 2008 at 3:25 PM, Karl Fogel <kf...@red-bean.com> wrote:
> "David Glasser" <gl...@davidglasser.net> writes:
>  > Though actually it varies.  In the CLI, -N does what I described.  But
>  > various other layers translate recurse to depth differently.  eg, the
>  > "add" exception doesn't exist in svn_client_add3.  In svnserve's
>  > 'status' handler, non-recursive goes to empty.  Etc.
>
>  I updated the document in r30301.  See the diff; I think all that was
>  really needed was to say "here's how -N behaves" and "see individual doc
>  strings for API compatibility", so that's what I did.
>
>
>  > I think we need to go back to what we had before where the conversion
>  > macro has a clear role name:
>  >
>  > SVN_DEPTH_FROM_RECURSE_FOR_STATUS
>  > SVN_DEPTH_FROM_RECURSE_FOR_REVERT_OR_ADD
>  > SVN_DEPTH_FROM_RECURSE
>  >
>  > Then it's absolutely obvious if a given use of the macro is consistent
>  > or not.  The status quo is a mess.
>
>  Well, the status quo is a mess for trying to answer certain kinds of
>  questions, but the other way is a mess for other kinds of questions.  I
>  kind of prefer the macros to just say what they do, and then we use a
>  particular macro wherever we want its particular functionality.
>
>
>  > (Unless there's some reason that the special-casing of these
>  > operations should be different at the UI, the client API, and the RA
>  > API levels?)
>
>  Hysterical raisins? :-)
>
>  Seriously, I suspect in every case the decision was compatibility.  That
>  is, we have to preserve whatever inconsistencies we had before, in a
>  backwards-compatible way.  (That's another reason why the current macro
>  names are better: the alternative leaves the reader wondering whether
>  it's talking about the CLI command, the client command, or the RA
>  command).

So you're confident the current massive inconsistency is correct and
not an oversight?  I'm unconvinced.  I understand that different
operations have different compatibility issues, but I find it hard to
believe that the conversion from bool->depth for different RA layers
is different, or that it's different from the client API wrapping it,
etc.

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r30205 - trunk/notes

Posted by Karl Fogel <kf...@red-bean.com>.
"David Glasser" <gl...@davidglasser.net> writes:
> Though actually it varies.  In the CLI, -N does what I described.  But
> various other layers translate recurse to depth differently.  eg, the
> "add" exception doesn't exist in svn_client_add3.  In svnserve's
> 'status' handler, non-recursive goes to empty.  Etc.

I updated the document in r30301.  See the diff; I think all that was
really needed was to say "here's how -N behaves" and "see individual doc
strings for API compatibility", so that's what I did.

> I think we need to go back to what we had before where the conversion
> macro has a clear role name:
>
> SVN_DEPTH_FROM_RECURSE_FOR_STATUS
> SVN_DEPTH_FROM_RECURSE_FOR_REVERT_OR_ADD
> SVN_DEPTH_FROM_RECURSE
>
> Then it's absolutely obvious if a given use of the macro is consistent
> or not.  The status quo is a mess.

Well, the status quo is a mess for trying to answer certain kinds of
questions, but the other way is a mess for other kinds of questions.  I
kind of prefer the macros to just say what they do, and then we use a
particular macro wherever we want its particular functionality.

> (Unless there's some reason that the special-casing of these
> operations should be different at the UI, the client API, and the RA
> API levels?)

Hysterical raisins? :-)

Seriously, I suspect in every case the decision was compatibility.  That
is, we have to preserve whatever inconsistencies we had before, in a
backwards-compatible way.  (That's another reason why the current macro
names are better: the alternative leaves the reader wondering whether
it's talking about the CLI command, the client command, or the RA
command).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: r30205 - trunk/notes

Posted by David Glasser <gl...@davidglasser.net>.
On Wed, Apr 2, 2008 at 8:44 PM, David Glasser <gl...@davidglasser.net> wrote:
> On Wed, Apr 2, 2008 at 3:37 PM,  <kf...@tigris.org> wrote:
>  > Author: kfogel
>  >  Date: Wed Apr  2 15:37:52 2008
>  >  New Revision: 30205
>  >
>  >  Log:
>  >  * notes/sparse-directories.txt: Bring up to date.
>
>
>
> >     On the client side, most of the svn_client.h interfaces that
>  >  -   formerly took 'svn_boolean_t recurse' now take 'svn_depth_t depth'.
>  >  -   (The -N option is deprecated, but it still works: it simply maps to
>  >  -   --depth=files, which results in the same behavior as -N used to.)
>  >  +   formerly took 'svn_boolean_t recurse' have been revved and their
>  >  +   successors take 'svn_depth_t depth' instead.  (The -N option is
>  >  +   deprecated, but it still works: it simply maps to --depth=files,
>  >  +   which results in the same behavior as -N used to.)
>
>  Isn't it actually "-N maps to --depth=files, empty, or immediates,
>  depending on context, for compatibility"?  (I think it's immediates
>  for status, empty for revert and add, and files for everything else,
>  or something.)

Though actually it varies.  In the CLI, -N does what I described.  But
various other layers translate recurse to depth differently.  eg, the
"add" exception doesn't exist in svn_client_add3.  In svnserve's
'status' handler, non-recursive goes to empty.  Etc.

I think we need to go back to what we had before where the conversion
macro has a clear role name:

SVN_DEPTH_FROM_RECURSE_FOR_STATUS
SVN_DEPTH_FROM_RECURSE_FOR_REVERT_OR_ADD
SVN_DEPTH_FROM_RECURSE

Then it's absolutely obvious if a given use of the macro is consistent
or not.  The status quo is a mess.

(Unless there's some reason that the special-casing of these
operations should be different at the UI, the client API, and the RA
API levels?)

--dave

-- 
David Glasser | glasser@davidglasser.net | http://www.davidglasser.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org