You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/05/04 17:21:48 UTC

svn commit: r1334029 - /subversion/trunk/subversion/libsvn_client/ra.c

Author: cmpilato
Date: Fri May  4 15:21:48 2012
New Revision: 1334029

URL: http://svn.apache.org/viewvc?rev=1334029&view=rev
Log:
Follow-up to r1333936, (hopefully) fixing the "commit disjoint working
copies" case that some of the buildbots are puking on right now.

* subversion/libsvn_client/ra.c
  (svn_client__open_ra_session_internal): base_dir_abspath might not
    point to a working copy directory.  If that's the case, don't try
    to calculate a working copy root path.

Modified:
    subversion/trunk/subversion/libsvn_client/ra.c

Modified: subversion/trunk/subversion/libsvn_client/ra.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?rev=1334029&r1=1334028&r2=1334029&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/ra.c (original)
+++ subversion/trunk/subversion/libsvn_client/ra.c Fri May  4 15:21:48 2012
@@ -337,9 +337,24 @@ svn_client__open_ra_session_internal(svn
           SVN_ERR(err);
         }
 
-      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
-                                  base_dir_abspath, pool, pool));
-      cb->wcroot_abspath = wcroot_abspath;
+      err = svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
+                                base_dir_abspath, pool, pool);
+      if (err)
+        {
+          if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
+            {
+              svn_error_clear(err);
+              err = SVN_NO_ERROR;
+            }
+          else
+            {
+              return err;
+            }
+        }
+      else
+        {
+          cb->wcroot_abspath = wcroot_abspath;
+        }
     }
 
   /* If the caller allows for auto-following redirections, and the



Re: svn commit: r1334029 - /subversion/trunk/subversion/libsvn_client/ra.c

Posted by "C. Michael Pilato" <cm...@collab.net>.
On 05/04/2012 11:35 AM, Bert Huijben wrote:
> 
> 
>> -----Original Message-----
>> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
>> Sent: vrijdag 4 mei 2012 17:22
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1334029 - /subversion/trunk/subversion/libsvn_client/ra.c
>>
>> Author: cmpilato
>> Date: Fri May  4 15:21:48 2012
>> New Revision: 1334029
>>
> Maybe it should also use that helper macro that allows catching multiple
> working copy not found errors, you introduced at least a year ago.

I wanted to use exactly that macro ... but I forgot what I called it.  :-(

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development


RE: svn commit: r1334029 - /subversion/trunk/subversion/libsvn_client/ra.c

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

> -----Original Message-----
> From: cmpilato@apache.org [mailto:cmpilato@apache.org]
> Sent: vrijdag 4 mei 2012 17:22
> To: commits@subversion.apache.org
> Subject: svn commit: r1334029 - /subversion/trunk/subversion/libsvn_client/ra.c
> 
> Author: cmpilato
> Date: Fri May  4 15:21:48 2012
> New Revision: 1334029
> 
> URL: http://svn.apache.org/viewvc?rev=1334029&view=rev
> Log:
> Follow-up to r1333936, (hopefully) fixing the "commit disjoint working
> copies" case that some of the buildbots are puking on right now.
> 
> * subversion/libsvn_client/ra.c
>   (svn_client__open_ra_session_internal): base_dir_abspath might not
>     point to a working copy directory.  If that's the case, don't try
>     to calculate a working copy root path.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_client/ra.c
> 
> Modified: subversion/trunk/subversion/libsvn_client/ra.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/ra.c?re
> v=1334029&r1=1334028&r2=1334029&view=diff
> =================================================================
> =============
> --- subversion/trunk/subversion/libsvn_client/ra.c (original)
> +++ subversion/trunk/subversion/libsvn_client/ra.c Fri May  4 15:21:48 2012
> @@ -337,9 +337,24 @@ svn_client__open_ra_session_internal(svn
>            SVN_ERR(err);
>          }
> 
> -      SVN_ERR(svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
> -                                  base_dir_abspath, pool, pool));
> -      cb->wcroot_abspath = wcroot_abspath;
> +      err = svn_wc__get_wc_root(&wcroot_abspath, ctx->wc_ctx,
> +                                base_dir_abspath, pool, pool);
> +      if (err)
> +        {
> +          if (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
> +            {
> +              svn_error_clear(err);
> +              err = SVN_NO_ERROR;
> +            }
> +          else
> +            {
> +              return err;
> +            }
> +        }
> +      else
> +        {
> +          cb->wcroot_abspath = wcroot_abspath;
> +        }

Note that it can still point to an unrelated parent working copy in this case where we are committing two separate working copies.

Maybe it should also use that helper macro that allows catching multiple working copy not found errors, you introduced at least a year ago.

	Bert

>      }
> 
>    /* If the caller allows for auto-following redirections, and the
>