[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] svn_client_commit[ 23] broken on trunk (was Re: check-swig-pl broken on trunk?)

From: John Peacock <john.peacock_at_havurah-software.org>
Date: 2007-10-22 02:38:10 CEST

I am resending this with a new subject line, because I don't think it was
obvious enough before. Even though the breakage showed up in the Perl bindings
tests, it actually affects any code that uses any of the svn_client_commit calls
 except for *_commit4.

If I can get a +1 from a full committer, I will apply this to trunk.

John

John Peacock wrote:
>> ------------------------------------------------------------------------
>> r26241 | kfogel | 2007-08-22 03:01:57 -0400 (Wed, 22 Aug 2007) | 25 lines
>>
>> Issue #2882: make 'commit --depth=foo' work.

I've figured out what was wrong; the above patch changed the API for
svn_client_commit4, but didn't update svn_client_commit3 to match (since
*_commit3 is implemented by calling *_commit4). Since there are no core tests
to exercise the historical commit calls, this went unnoticed for two months. In
this case, the Perl bindings were merely the "canary in the coal mine" since
there was nothing that changed them. They just happened to be using an old API
call, which no longer worked.

The only thing I'm not sure of is whether SVN_DEPTH_INFINITY_OR_FILES or
SVN_DEPTH_INFINITY_OR_IMMEDIATES is the appropriate match for the old
non-recursive options. I have to say that I have no idea based on the
[unhelpful to me] help text in svn/main.c for the obsolete non-recursive option.

John

[[[
New depth argument for svn_client_commit4 wasn't promoted to
svn_client_commit3, thus breaking all older commit API calls.

* subversion/libsvn_client/commit.c
  (svn_client_commit3): synthesize depth argument from old recurse argument
]]]

Index: subversion/libsvn_client/commit.c
===================================================================
--- subversion/libsvn_client/commit.c (revision 27297)
+++ subversion/libsvn_client/commit.c (working copy)
@@ -1770,7 +1770,9 @@
                    svn_client_ctx_t *ctx,
                    apr_pool_t *pool)
 {
- return svn_client_commit4(commit_info_p, targets, recurse, keep_locks,
+ svn_depth_t depth = SVN_DEPTH_INFINITY_OR_FILES(recurse);
+
+ return svn_client_commit4(commit_info_p, targets, depth, keep_locks,
                             FALSE, NULL, ctx, pool);
 }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Oct 22 02:38:00 2007

This is an archived mail posted to the Subversion Dev mailing list.