You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Karl Fogel <kf...@newton.ch.collab.net> on 2002/07/12 03:35:17 UTC

Re: svn commit: rev 2472 - trunk/subversion/libsvn_client

Thanks for fixing 675!

kevin@tigris.org writes:
> * subversion/libsvn_client/copy.c(setup_copy): Convert working copy source
>   path to url if a src revision is specified.  Also remove unnecessary if
>   condition.  "if (a || a)" is equivalent to "if (a)"
> 
> 
> Modified: trunk/subversion/libsvn_client/copy.c
> @@ -878,12 +879,26 @@
>           happens to be the HEAD.  It's fair enough to punt then, IMHO,
>           and just demand that the user not specify a revision at all;
>           beats mucking up this function with RA calls and such. */ 
> -      if ((src_revision->kind != svn_client_revision_unspecified)
> -          || (src_revision->kind != svn_client_revision_unspecified))
> +      if (src_revision->kind != svn_client_revision_unspecified)

Chances are this was not meant to be (a || a), but (a || b), someone
just forgot to change a to b after cutting and pasting.

Based on the context, I suspect that it was meant to be
svn_client_revision_head.  If you concur, can you restore with the
fix?

> +  else
> +    {
> +      if (!src_is_url)
> +        {
> +          if (src_revision->kind != svn_client_revision_unspecified)
> +            {
> +              /* We can convert the working copy path to a URL based on the
> +                 entries file. */
> +              svn_wc_entry_t *entry;
> +              SVN_ERR (svn_wc_entry (&entry, src_path, FALSE, pool));
> +              src_path = entry->url;
> +              src_is_url = TRUE;
> +            }
>          }
>      }

And perhaps same for the corresponding `if' here?

-K

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

Re: svn commit: rev 2472 - trunk/subversion/libsvn_client

Posted by Kevin Pilch-Bisson <ke...@pilch-bisson.net>.
On Thu, Jul 11, 2002 at 10:35:17PM -0500, Karl Fogel wrote:
> Thanks for fixing 675!
> 
> kevin@tigris.org writes:
> > * subversion/libsvn_client/copy.c(setup_copy): Convert working copy source
> >   path to url if a src revision is specified.  Also remove unnecessary if
> >   condition.  "if (a || a)" is equivalent to "if (a)"
> > 
> > 
> > Modified: trunk/subversion/libsvn_client/copy.c
> > @@ -878,12 +879,26 @@
> >           happens to be the HEAD.  It's fair enough to punt then, IMHO,
> >           and just demand that the user not specify a revision at all;
> >           beats mucking up this function with RA calls and such. */ 
> > -      if ((src_revision->kind != svn_client_revision_unspecified)
> > -          || (src_revision->kind != svn_client_revision_unspecified))
> > +      if (src_revision->kind != svn_client_revision_unspecified)
> 
> Chances are this was not meant to be (a || a), but (a || b), someone
> just forgot to change a to b after cutting and pasting.
> 
> Based on the context, I suspect that it was meant to be
> svn_client_revision_head.  If you concur, can you restore with the
> fix?

Doh, I was trying to think of what it could be last night. I was stuck on the
src_path vs dst_path thing, and thought that maybe it was at one time the
dest_path.  I'll fix momentarily.

> 
> > +  else
> > +    {
> > +      if (!src_is_url)
> > +        {
> > +          if (src_revision->kind != svn_client_revision_unspecified)
> > +            {
> > +              /* We can convert the working copy path to a URL based on the
> > +                 entries file. */
> > +              svn_wc_entry_t *entry;
> > +              SVN_ERR (svn_wc_entry (&entry, src_path, FALSE, pool));
> > +              src_path = entry->url;
> > +              src_is_url = TRUE;
> > +            }
> >          }
> >      }
> 
> And perhaps same for the corresponding `if' here?
> 
> -K
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kevin Pilch-Bisson                    http://www.pilch-bisson.net
     "Historically speaking, the presences of wheels in Unix
     has never precluded their reinvention." - Larry Wall
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~