Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-02-01 Thread Justin Erenkrantz
On Mon, Feb 1, 2010 at 9:02 AM, Julian Foad  wrote:
>> > Committed this patch at r905326.
>>
>> Xlnt.  Thanks, Kamesh.
>
> Ah, my favourite kind of bug fix: *removing* a bunch of code (and adding
> one line instead).

Sweet.  =)  -- justin


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-02-01 Thread Julian Foad
On Mon, 2010-02-01 at 11:40 -0500, C. Michael Pilato wrote:
> Kamesh Jayachandran wrote:
> >>> Right.  Now, that said, it might be prudent to make the same fix in Serf's
> >>> non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an easy
> >>> client-side fix to be had, seems silly to require a server upgrade
> >>> instead.
> >>>
> >>> Kamesh, can you look into this?
> >>>
> >> Attached patch fixes it, though I need to get better context to the
> >> relevant code base to give a 100% confident fix, which I will do it
> >> sooner.
> >>
> >> With regards
> >> Kamesh Jayachandran
> >>
> > Committed this patch at r905326.
> 
> Xlnt.  Thanks, Kamesh.

Ah, my favourite kind of bug fix: *removing* a bunch of code (and adding
one line instead).

Thanks.

- Julian




Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-02-01 Thread C. Michael Pilato
Kamesh Jayachandran wrote:
>>> Right.  Now, that said, it might be prudent to make the same fix in Serf's
>>> non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an easy
>>> client-side fix to be had, seems silly to require a server upgrade
>>> instead.
>>>
>>> Kamesh, can you look into this?
>>>
>> Attached patch fixes it, though I need to get better context to the
>> relevant code base to give a 100% confident fix, which I will do it
>> sooner.
>>
>> With regards
>> Kamesh Jayachandran
>>
> Committed this patch at r905326.

Xlnt.  Thanks, Kamesh.

-- 
C. Michael Pilato 
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-02-01 Thread Kamesh Jayachandran

On 01/29/2010 04:18 PM, Kamesh Jayachandran wrote:

On 01/28/2010 09:08 PM, C. Michael Pilato wrote:

Julian Foad wrote:

On Thu, 2010-01-28 at 10:23 -0500, C. Michael Pilato wrote:

Julian Foad wrote:

On Wed, 2010-01-20, Julian Foad wrote:

I have added issue #3561
  to 
track this
Just now, using a client built from today's trunk code, I got the 
same

problem when committing with Serf:

[...]


In earlier emails [1] and [2], Kamesh indicated that Serf does not
suffer the same problem because it does not issue the PROPFIND, 
but that

was in the context of Mike asking about HTTPv2, so I am not clear
whether that applies to an ordinary build or if I have to do 
something

special to use HTTPv2.
You have to have a server that supports HTTPv2.  The ASF server is 
not such

a server (because we haven't released Subversion 1.7 yet).

Ah, thanks. So when it's upgraded, that part of the problem will be
solved too. That's good.
Right.  Now, that said, it might be prudent to make the same fix in 
Serf's
non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an 
easy
client-side fix to be had, seems silly to require a server upgrade 
instead.


Kamesh, can you look into this?

Attached patch fixes it, though I need to get better context to the 
relevant code base to give a 100% confident fix, which I will do it 
sooner.


With regards
Kamesh Jayachandran


Committed this patch at r905326.

With regards
Kamesh Jayachandran


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-29 Thread C. Michael Pilato
>> Right.  Now, that said, it might be prudent to make the same fix in Serf's
>> non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an easy
>> client-side fix to be had, seems silly to require a server upgrade instead.
>>
>> Kamesh, can you look into this?
>>
>>
> Attached patch fixes it, though I need to get better context to the
> relevant code base to give a 100% confident fix, which I will do it sooner.

I assume that printf() isn't part of the intended patch?  :-)

-- 
C. Michael Pilato 
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-29 Thread Kamesh Jayachandran

On 01/28/2010 09:08 PM, C. Michael Pilato wrote:

Julian Foad wrote:
   

On Thu, 2010-01-28 at 10:23 -0500, C. Michael Pilato wrote:
 

Julian Foad wrote:
   

On Wed, 2010-01-20, Julian Foad wrote:
 

I have added issue #3561
  to track this
   

Just now, using a client built from today's trunk code, I got the same
problem when committing with Serf:
 

[...]

   

In earlier emails [1] and [2], Kamesh indicated that Serf does not
suffer the same problem because it does not issue the PROPFIND, but that
was in the context of Mike asking about HTTPv2, so I am not clear
whether that applies to an ordinary build or if I have to do something
special to use HTTPv2.
 

You have to have a server that supports HTTPv2.  The ASF server is not such
a server (because we haven't released Subversion 1.7 yet).
   

Ah, thanks. So when it's upgraded, that part of the problem will be
solved too. That's good.
 

Right.  Now, that said, it might be prudent to make the same fix in Serf's
non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an easy
client-side fix to be had, seems silly to require a server upgrade instead.

Kamesh, can you look into this?

   
Attached patch fixes it, though I need to get better context to the 
relevant code base to give a 100% confident fix, which I will do it sooner.


With regards
Kamesh Jayachandran
Index: subversion/libsvn_ra_serf/commit.c
===
--- subversion/libsvn_ra_serf/commit.c  (revision 904436)
+++ subversion/libsvn_ra_serf/commit.c  (working copy)
@@ -91,6 +91,7 @@
   checkout_context_t *baseline;  /* checkout for the baseline */
   const char *checked_in_url;/* checked-in root to base CHECKOUTs from */
   const char *baseline_url;  /* root baseline collection */
+  const char *vcc_url;   /* vcc url */
 
 } commit_context_t;
 
@@ -254,6 +255,7 @@
 
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:href");
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:activity-set");
+  svn_ra_serf__add_tag_buckets(body_bkt, "D:apply-to-version", NULL, alloc);
   svn_ra_serf__add_close_tag_buckets(body_bkt, alloc, "D:checkout");
 
   return body_bkt;
@@ -393,7 +395,7 @@
*/
   if (!dir->parent_dir && !dir->commit->baseline)
 {
-  checkout_ctx->checkout_url = dir->commit->baseline_url;
+  checkout_ctx->checkout_url = dir->commit->vcc_url;
   dir->commit->baseline = checkout_ctx;
 }
   else
@@ -410,6 +412,7 @@
   handler->response_baton = checkout_ctx;
 
   handler->method = "CHECKOUT";
+  printf("checkout_ctx->checkout_url=%s\n", checkout_ctx->checkout_url);
   handler->path = checkout_ctx->checkout_url;
 
   svn_ra_serf__request_create(handler);
@@ -1080,7 +1083,6 @@
   svn_ra_serf__handler_t *handler;
   proppatch_context_t *proppatch_ctx;
   dir_context_t *dir;
-  apr_hash_t *props;
   apr_hash_index_t *hi;
   const char *proppatch_target;
 
@@ -1150,9 +1152,7 @@
 {
   svn_ra_serf__options_context_t *opt_ctx;
   svn_ra_serf__simple_request_context_t *mkact_ctx;
-  svn_ra_serf__propfind_context_t *propfind_ctx;
   const char *activity_str;
-  const char *vcc_url;
 
   SVN_ERR(svn_ra_serf__create_options_req(&opt_ctx, ctx->session,
   ctx->session->conns[0],
@@ -1202,31 +1202,10 @@
 }
 
   /* Now go fetch our VCC and baseline so we can do a CHECKOUT. */
-  SVN_ERR(svn_ra_serf__discover_vcc(&vcc_url, ctx->session,
+  SVN_ERR(svn_ra_serf__discover_vcc(&(ctx->vcc_url), ctx->session,
 ctx->conn, ctx->pool));
 
-  props = apr_hash_make(ctx->pool);
-  propfind_ctx = NULL;
-  SVN_ERR(svn_ra_serf__deliver_props(&propfind_ctx, props, ctx->session,
- ctx->conn, vcc_url,
- SVN_INVALID_REVNUM, "0",
- checked_in_props, FALSE,
- NULL, ctx->pool));
 
-  SVN_ERR(svn_ra_serf__wait_for_props(propfind_ctx, ctx->session,
-  ctx->pool));
-
-  ctx->baseline_url = svn_ra_serf__get_ver_prop(props, vcc_url,
-SVN_INVALID_REVNUM,
-"DAV:", "checked-in");
-
-  if (!ctx->baseline_url)
-{
-  return svn_error_create(SVN_ERR_RA_DAV_OPTIONS_REQ_FAILED, NULL,
-  _("The OPTIONS response did not include the "
-"requested checked-in value"));
-}
-
   /* Build our directory baton. */
   dir = apr_pcalloc(dir_pool, sizeof(*dir));
   dir->pool = dir_pool;


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-28 Thread C. Michael Pilato
Julian Foad wrote:
> On Thu, 2010-01-28 at 10:23 -0500, C. Michael Pilato wrote:
>> Julian Foad wrote:
>>> On Wed, 2010-01-20, Julian Foad wrote:
 I have added issue #3561
  to track this
>>> Just now, using a client built from today's trunk code, I got the same
>>> problem when committing with Serf:
>> [...]
>>
>>> In earlier emails [1] and [2], Kamesh indicated that Serf does not
>>> suffer the same problem because it does not issue the PROPFIND, but that
>>> was in the context of Mike asking about HTTPv2, so I am not clear
>>> whether that applies to an ordinary build or if I have to do something
>>> special to use HTTPv2.
>> You have to have a server that supports HTTPv2.  The ASF server is not such
>> a server (because we haven't released Subversion 1.7 yet).
> 
> Ah, thanks. So when it's upgraded, that part of the problem will be
> solved too. That's good.

Right.  Now, that said, it might be prudent to make the same fix in Serf's
non-HTTPv2 codepath that Kamesh made for Neon.  I mean, if there's an easy
client-side fix to be had, seems silly to require a server upgrade instead.

Kamesh, can you look into this?

-- 
C. Michael Pilato 
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-28 Thread Julian Foad
On Thu, 2010-01-28 at 10:23 -0500, C. Michael Pilato wrote:
> Julian Foad wrote:
> > On Wed, 2010-01-20, Julian Foad wrote:
> >> I have added issue #3561
> >>  to track this
> > 
> > Just now, using a client built from today's trunk code, I got the same
> > problem when committing with Serf:
> 
> [...]
> 
> > In earlier emails [1] and [2], Kamesh indicated that Serf does not
> > suffer the same problem because it does not issue the PROPFIND, but that
> > was in the context of Mike asking about HTTPv2, so I am not clear
> > whether that applies to an ordinary build or if I have to do something
> > special to use HTTPv2.
> 
> You have to have a server that supports HTTPv2.  The ASF server is not such
> a server (because we haven't released Subversion 1.7 yet).

Ah, thanks. So when it's upgraded, that part of the problem will be
solved too. That's good.

- Julian




Re: Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-28 Thread C. Michael Pilato
Julian Foad wrote:
> On Wed, 2010-01-20, Julian Foad wrote:
>> I have added issue #3561
>>  to track this
> 
> Just now, using a client built from today's trunk code, I got the same
> problem when committing with Serf:

[...]

> In earlier emails [1] and [2], Kamesh indicated that Serf does not
> suffer the same problem because it does not issue the PROPFIND, but that
> was in the context of Mike asking about HTTPv2, so I am not clear
> whether that applies to an ordinary build or if I have to do something
> special to use HTTPv2.

You have to have a server that supports HTTPv2.  The ASF server is not such
a server (because we haven't released Subversion 1.7 yet).

-- 
C. Michael Pilato 
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand



signature.asc
Description: OpenPGP digital signature


Commit failure via out of date proxy - issue #3561 - with Serf

2010-01-28 Thread Julian Foad
On Wed, 2010-01-20, Julian Foad wrote:
> I have added issue #3561
>  to track this

Just now, using a client built from today's trunk code, I got the same
problem when committing with Serf:

[[[
$ svn ci -F n-o.patch subversion/libsvn_fs_base/
/.../subversion/svn/commit-cmd.c:142: (apr_err=190003)
/.../subversion/libsvn_client/commit.c:853: (apr_err=190003)
svn: Commit failed (details follow):
/.../subversion/libsvn_client/commit_util.c:1634: (apr_err=190003)
/.../subversion/libsvn_delta/path_driver.c:173: (apr_err=190003)
/.../subversion/libsvn_ra_serf/commit.c:1246: (apr_err=190003)
/.../subversion/libsvn_ra_serf/util.c:596: (apr_err=190003)
/.../subversion/libsvn_ra_serf/util.c:738: (apr_err=190003)
svn: The specified baseline is not the latest baseline, so it may not be 
checked out.

$ svn ci -F n-o.patch subversion/libsvn_fs_base/
Sendingsubversion/libsvn_fs_base/dag.c
Sendingsubversion/libsvn_fs_base/dag.h
Sendingsubversion/libsvn_fs_base/node-rev.h
Sendingsubversion/libsvn_fs_base/util/fs_skels.h
Transmitting file data 
Committed revision 904095.

$ svn --version
svn, version 1.7.0 (dev build)
   compiled Jan 28 2010, 14:21:13

Copyright (C) 2010 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
  - with Cyrus SASL authentication
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme
]]]

In earlier emails [1] and [2], Kamesh indicated that Serf does not
suffer the same problem because it does not issue the PROPFIND, but that
was in the context of Mike asking about HTTPv2, so I am not clear
whether that applies to an ordinary build or if I have to do something
special to use HTTPv2.

- Julian


[1]


[2]