You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/08/02 16:21:20 UTC
svn commit: r1153138 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Author: rhuijben
Date: Tue Aug 2 14:21:19 2011
New Revision: 1153138
URL: http://svn.apache.org/viewvc?rev=1153138&view=rev
Log:
Resolve an HTTP 500 error found when dav-checking out a newly added directory
via httpv1. This error was reported via serf when committing a new directory
and a new file inside.
Somehow I get into this case every now and then when adding new code using
AnkhSVN.
* subversion/libsvn_ra_serf/commit.c
(checkout_dir): Also check the directory itself for being added. Rename
variable as it doesn't always point to the parent any more.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/commit.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1153138&r1=1153137&r2=1153138&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Tue Aug 2 14:21:19 2011
@@ -355,19 +355,18 @@ checkout_dir(dir_context_t *dir)
checkout_context_t *checkout_ctx;
svn_ra_serf__handler_t *handler;
svn_error_t *err;
- dir_context_t *parent_dir = dir->parent_dir;
+ dir_context_t *p_dir = dir;
if (dir->checkout)
{
return SVN_NO_ERROR;
}
- /* Is one of our parent dirs newly added? If so, we're already
- * implicitly checked out.
- */
- while (parent_dir)
+ /* Is this directory or one of our parent dirs newly added?
+ * If so, we're already implicitly checked out. */
+ while (p_dir)
{
- if (parent_dir->added)
+ if (p_dir->added)
{
/* Implicitly checkout this dir now. */
dir->checkout = apr_pcalloc(dir->pool, sizeof(*dir->checkout));
@@ -381,7 +380,7 @@ checkout_dir(dir_context_t *dir)
return SVN_NO_ERROR;
}
- parent_dir = parent_dir->parent_dir;
+ p_dir = p_dir->parent_dir;
}
/* Checkout our directory into the activity URL now. */
@@ -1922,6 +1921,7 @@ add_file(const char *path,
else
{
/* Ensure our parent directory has been checked out */
+ SVN_DBG(("Checking out for %s\n", path));
SVN_ERR(checkout_dir(dir));
new_file->url =