You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2010/08/06 15:31:38 UTC

svn commit: r982952 - in /subversion/trunk/subversion/libsvn_ra_neon: commit.c fetch.c session.c util.c

Author: stylesen
Date: Fri Aug  6 13:31:37 2010
New Revision: 982952

URL: http://svn.apache.org/viewvc?rev=982952&view=rev
Log:
While working on a wc of a repo which needs authentication, 'store
password unencrypted' prompt is getting invoked only for those svn
commands that access the repo URL or that have an URL as argument
(eg. svn ls http://localhost/repo) and not for wc oriented commands
such as `svn ls' or `svn cat -r 5 test.c' which also require
authentication, which is solved here. This also fixes redundant
invokation of the function 'svn_ra_neon__maybe_store_auth_info' at
various places.

* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__request_create): Store auth credentials if we can.

* subversion/libsvn_ra_neon/session.c
  (svn_ra_neon__do_get_uuid): Remove redundant invocation.

* subversion/libsvn_ra_neon/commit.c
  (commit_close_edit): Remove redundant invocation.

* subversion/libsvn_ra_neon/fetch.c
  (svn_ra_neon__get_latest_revnum, reporter_finish_report): Remove
   redundant invocation.

Patch by: Kannan R <ka...@collab.net>
          me

Modified:
    subversion/trunk/subversion/libsvn_ra_neon/commit.c
    subversion/trunk/subversion/libsvn_ra_neon/fetch.c
    subversion/trunk/subversion/libsvn_ra_neon/session.c
    subversion/trunk/subversion/libsvn_ra_neon/util.c

Modified: subversion/trunk/subversion/libsvn_ra_neon/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/commit.c?rev=982952&r1=982951&r2=982952&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/commit.c Fri Aug  6 13:31:37 2010
@@ -1355,7 +1355,6 @@ static svn_error_t * commit_close_edit(v
                                       cc->disable_merge_response,
                                       pool));
   SVN_ERR(delete_activity(edit_baton, pool));
-  SVN_ERR(svn_ra_neon__maybe_store_auth_info(cc->ras, pool));
 
   if (cc->callback && commit_info->revision != SVN_INVALID_REVNUM)
     SVN_ERR(cc->callback(commit_info, cc->callback_baton, pool));

Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/fetch.c?rev=982952&r1=982951&r2=982952&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri Aug  6 13:31:37 2010
@@ -1111,7 +1111,6 @@ svn_error_t *svn_ra_neon__get_latest_rev
                                              ras, ras->root.path,
                                              SVN_INVALID_REVNUM, pool));
     }
-  SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
 
   return NULL;
 }
@@ -2440,9 +2439,6 @@ static svn_error_t * reporter_finish_rep
         (SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
          _("REPORT response handling failed to complete the editor drive"));
     }
-
-  /* store auth info if we can. */
-  return svn_ra_neon__maybe_store_auth_info(rb->ras, pool);
 }
 
 static const svn_ra_reporter3_t ra_neon_reporter = {

Modified: subversion/trunk/subversion/libsvn_ra_neon/session.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/session.c?rev=982952&r1=982951&r2=982952&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/session.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/session.c Fri Aug  6 13:31:37 2010
@@ -1170,7 +1170,6 @@ static svn_error_t *svn_ra_neon__do_get_
       SVN_ERR(svn_ra_neon__search_for_starting_props(&rsrc, &lopped_path,
                                                      ras, ras->url->data,
                                                      pool));
-      SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
 
       if (! ras->uuid)
         {

Modified: subversion/trunk/subversion/libsvn_ra_neon/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon/util.c?rev=982952&r1=982951&r2=982952&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_neon/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_neon/util.c Fri Aug  6 13:31:37 2010
@@ -362,6 +362,9 @@ svn_ra_neon__request_create(svn_ra_neon_
   apr_pool_t *reqpool = svn_pool_create(pool);
   svn_ra_neon__request_t *req = apr_pcalloc(reqpool, sizeof(*req));
 
+  /* If there is auth credentials in this session, store it if we can. */
+  SVN_ERR(svn_ra_neon__maybe_store_auth_info(sess, pool));
+
   /* We never want to send Neon an absolute URL, since that can cause
      problems with some servers (for example, those that may be accessed
      using different server names from different locations, or those that



RE: svn commit: r982952 - in /subversion/trunk/subversion/libsvn_ra_neon: commit.c fetch.c session.c util.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: stylesen@apache.org [mailto:stylesen@apache.org]
> Sent: vrijdag 6 augustus 2010 15:32
> To: commits@subversion.apache.org
> Subject: svn commit: r982952 - in
> /subversion/trunk/subversion/libsvn_ra_neon: commit.c fetch.c session.c
> util.c
> 
> Author: stylesen
> Date: Fri Aug  6 13:31:37 2010
> New Revision: 982952
> 
> URL: http://svn.apache.org/viewvc?rev=982952&view=rev
> Log:
> While working on a wc of a repo which needs authentication, 'store
> password unencrypted' prompt is getting invoked only for those svn
> commands that access the repo URL or that have an URL as argument
> (eg. svn ls http://localhost/repo) and not for wc oriented commands
> such as `svn ls' or `svn cat -r 5 test.c' which also require
> authentication, which is solved here. This also fixes redundant
> invokation of the function 'svn_ra_neon__maybe_store_auth_info' at
> various places.

The compilation of this patch breaks in several places and most likely on multiple buildbots

> 
> Modified: subversion/trunk/subversion/libsvn_ra_neon/fetch.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_neon
> /fetch.c?rev=982952&r1=982951&r2=982952&view=diff
> =======================================================================
> =======
> --- subversion/trunk/subversion/libsvn_ra_neon/fetch.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_neon/fetch.c Fri Aug  6
> 13:31:37 2010
> @@ -1111,7 +1111,6 @@ svn_error_t *svn_ra_neon__get_latest_rev
>                                               ras, ras->root.path,
>                                               SVN_INVALID_REVNUM,
> pool));
>      }
> -  SVN_ERR(svn_ra_neon__maybe_store_auth_info(ras, pool));
> 
>    return NULL;
>  }
> @@ -2440,9 +2439,6 @@ static svn_error_t * reporter_finish_rep
>          (SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
>           _("REPORT response handling failed to complete the editor
> drive"));
>      }
> -
> -  /* store auth info if we can. */
> -  return svn_ra_neon__maybe_store_auth_info(rb->ras, pool);
>  }

This leaves a function without a return statement.


> @@ -362,6 +362,9 @@ svn_ra_neon__request_create(svn_ra_neon_
>    apr_pool_t *reqpool = svn_pool_create(pool);
>    svn_ra_neon__request_t *req = apr_pcalloc(reqpool, sizeof(*req));
> 
> +  /* If there is auth credentials in this session, store it if we can.
> */
> +  SVN_ERR(svn_ra_neon__maybe_store_auth_info(sess, pool));
> +

This function doesn't return svn_error_t *, so you can't return errors here.

	Bert