You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/01/14 20:30:09 UTC

Re: svn commit: rev 879 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/tests/libsvn_subr

On Mon, Jan 14, 2002 at 01:56:51PM -0600, cmpilato@tigris.org wrote:
>...
> +++ NEW/trunk/subversion/libsvn_wc/util.c	Mon Jan 14 13:56:49 2002
> @@ -111,14 +111,13 @@
>  {
>    enum svn_wc__eol_style style;
>    const char *eol;
> -  char *revision, *author, *date, *url;
> +  svn_io_keywords_t *keywords;
>    
>    SVN_ERR (svn_wc__get_eol_style (&style, &eol, vfile->data, pool));
> -  SVN_ERR (svn_wc__get_keywords (&revision, &author, &date, &url,
> +  SVN_ERR (svn_wc__get_keywords (&keywords,
>                                   vfile->data, NULL, pool));
>  
> -  if ((style == svn_wc__eol_style_none)
> -      && (! revision) && (! author) && (! date) && (! url))
> +  if ((style == svn_wc__eol_style_none) && (! keywords))

What about the case where keywords is supplied, but the pointers are all
NULL? Is an app supposed to first check the keywords structure before
passing it, decide there isn't anything in it, and pass NULL instead? I'd
say "no" :-) ... which means you could get all NULLs and not want to do any
translation.

>...
> @@ -1602,9 +1608,7 @@
>                       - fb->dir_baton->path->len - 1,
>                       fb->pool);
>  
> -                  /* ### check for NULL keyword structure in future: */
> -                  if ((eol_style == svn_wc__eol_style_none)
> -                      && (! (revision || date || author || url)))
> +                  if ((eol_style == svn_wc__eol_style_none) && (! keywords))

Same here. Sorry, but I lost/deleted the context...

>...
>  #if 0 /* ### todo:  here's a little shortcut */
> -  if (! (eol_str || revision || date || author || url))
> +  if (! (eol_str || keywords))

And here?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: svn commit: rev 879 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/tests/libsvn_subr

Posted by cm...@collab.net.
Greg Stein <gs...@lyra.org> writes:

> > If you get all NULLs, you will, yes, be doing translation, but no
> > keywords will be expanded/contracted.  So, you *effectively* are doing
> > no translation.
> 
> Right; that's what I was thinking, so I was hoping that the actual
> translation step could be avoided. i.e. optimize partway with the !keywords
> as you have, and another step with the check for individual NULLs. (to
> hopefully avoid that timestamp change)

Ah, yes.  I see your concern...and raise you about 100 probable bugs
in this new code ;-)

Noted.  Will repair.

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

Re: svn commit: rev 879 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/tests/libsvn_subr

Posted by Greg Stein <gs...@lyra.org>.
On Mon, Jan 14, 2002 at 02:31:51PM -0600, cmpilato@collab.net wrote:
> Greg Stein <gs...@lyra.org> writes:
> 
> > > -  if ((style == svn_wc__eol_style_none)
> > > -      && (! revision) && (! author) && (! date) && (! url))
> > > +  if ((style == svn_wc__eol_style_none) && (! keywords))
> > 
> > What about the case where keywords is supplied, but the pointers are all
> > NULL? Is an app supposed to first check the keywords structure before
> > passing it, decide there isn't anything in it, and pass NULL instead? I'd
> > say "no" :-) ... which means you could get all NULLs and not want to do any
> > translation.
> 
> If you get all NULLs, you will, yes, be doing translation, but no
> keywords will be expanded/contracted.  So, you *effectively* are doing
> no translation.

Right; that's what I was thinking, so I was hoping that the actual
translation step could be avoided. i.e. optimize partway with the !keywords
as you have, and another step with the check for individual NULLs. (to
hopefully avoid that timestamp change)

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: svn commit: rev 879 - trunk/subversion/include trunk/subversion/libsvn_wc trunk/subversion/libsvn_subr trunk/subversion/tests/libsvn_subr

Posted by cm...@collab.net.
Greg Stein <gs...@lyra.org> writes:

> > -  if ((style == svn_wc__eol_style_none)
> > -      && (! revision) && (! author) && (! date) && (! url))
> > +  if ((style == svn_wc__eol_style_none) && (! keywords))
> 
> What about the case where keywords is supplied, but the pointers are all
> NULL? Is an app supposed to first check the keywords structure before
> passing it, decide there isn't anything in it, and pass NULL instead? I'd
> say "no" :-) ... which means you could get all NULLs and not want to do any
> translation.

If you get all NULLs, you will, yes, be doing translation, but no
keywords will be expanded/contracted.  So, you *effectively* are doing
no translation.


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