You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/03/10 12:11:59 UTC

svn commit: r921304 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

Author: julianfoad
Date: Wed Mar 10 11:11:58 2010
New Revision: 921304

URL: http://svn.apache.org/viewvc?rev=921304&view=rev
Log:
Remove a redundant check.

* subversion/libsvn_wc/update_editor.c
  (prep_directory): Don't check edit_baton->repos is non-null, because it's
    known to be so (asserted at editor initialisation, assumed in lots of
    other places, and documented since r920023).

Modified:
    subversion/trunk/subversion/libsvn_wc/update_editor.c

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=921304&r1=921303&r2=921304&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Mar 10 11:11:58 2010
@@ -1172,8 +1172,7 @@ prep_directory(struct dir_baton *db,
 
   /* Use the repository root of the anchor, but only if it actually is an
      ancestor of the URL of this directory. */
-  if (db->edit_baton->repos
-      && svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
+  if (svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
     repos = db->edit_baton->repos;
   else
     repos = NULL;



Re: svn commit: r921304 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

Posted by Julian Foad <ju...@wandisco.com>.
On Wed, 2010-03-10, Greg Stein wrote:
> On Wed, Mar 10, 2010 at 06:11,  <ju...@apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Mar 10 11:11:58 2010
> > @@ -1172,8 +1172,7 @@ prep_directory(struct dir_baton *db,
> >
> >   /* Use the repository root of the anchor, but only if it actually is an
> >      ancestor of the URL of this directory. */
> > -  if (db->edit_baton->repos
> > -      && svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
> > +  if (svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
> >     repos = db->edit_baton->repos;
> >   else
> >     repos = NULL;
> 
> Seeing this... I'm thinking we should rename variables and struct
> members to REPOS_ROOT. Stick with the new-standard of naming for that
> semantic.

r921748.

- Julian


Re: svn commit: r921304 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

Posted by Greg Stein <gs...@gmail.com>.
On Wed, Mar 10, 2010 at 06:11,  <ju...@apache.org> wrote:
>...
> +++ subversion/trunk/subversion/libsvn_wc/update_editor.c Wed Mar 10 11:11:58 2010
> @@ -1172,8 +1172,7 @@ prep_directory(struct dir_baton *db,
>
>   /* Use the repository root of the anchor, but only if it actually is an
>      ancestor of the URL of this directory. */
> -  if (db->edit_baton->repos
> -      && svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
> +  if (svn_uri_is_ancestor(db->edit_baton->repos, ancestor_url))
>     repos = db->edit_baton->repos;
>   else
>     repos = NULL;

Seeing this... I'm thinking we should rename variables and struct
members to REPOS_ROOT. Stick with the new-standard of naming for that
semantic.

Cheers,
-g