You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Kamesh Jayachandran <ka...@collab.net> on 2006/10/12 12:47:54 UTC
Re: svn commit: r21887 - in trunk: . subversion/include subversion/libsvn_client
subversion/svn subversion/tests/cmdline
Couple of observations.
1)When I propedit on the URL, for some reason abort at the 'log message
screen'. I get the following message.
<snip>
Set new value for property 'svn:mergeinfo' on
'file:///home/kamesh/work/svn/merge-tracking/my_test_area_fsfs/repo/trunk'
</snip>
2)When I get the Out of date error in propedit, I loose my actual
propchange.
Like we preserve the log message we should preserve the 'edited propval'
too.
Thanks for the nice patch.
glasser@tigris.org wrote:
> Author: glasser
> Date: Wed Oct 11 11:03:13 2006
> New Revision: 21887
>
> Log:
> Support "svn propedit PROPNAME URL...".
>
> * subversion/include/svn_client.h
> (svn_client_propset3): Bumped from svn_client_propset2, now supports
> being called on URLs, as long as the new base_revision_for_url is
> valid. Also takes an svn_commit_info_t.
> (svn_client_propget3): Bumped from svn_client_propget3; now
>
Hope you meant
(svn_client_propget3): Bumped from svn_client_propget2; now
> Modified: trunk/subversion/libsvn_client/prop_commands.c
> URL: http://svn.collab.net/viewvc/svn/trunk/subversion/libsvn_client/prop_commands.c?pathrev=21887&r1=21886&r2=21887
> ==============================================================================
> --- trunk/subversion/libsvn_client/prop_commands.c (original)
> +++ trunk/subversion/libsvn_client/prop_commands.c Wed Oct 11 11:03:13 2006
> @@ -128,12 +128,175 @@
> return SVN_NO_ERROR;
> }
>
> +
> +
> +
> +static
> +svn_error_t *
> +propset_on_url(svn_commit_info_t **commit_info_p,
> + const char *propname,
> + const svn_string_t *propval,
> + const char *target,
> + svn_boolean_t skip_checks,
> + svn_revnum_t base_revision_for_url,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *pool)
> +{
> + enum svn_prop_kind prop_kind = svn_property_kind(NULL, propname);
> + svn_ra_session_t *ra_session;
> + svn_node_kind_t node_kind;
> + const char *message;
> + const svn_delta_editor_t *editor;
> + void *commit_baton, *edit_baton;
> + apr_array_header_t *paths = apr_array_make(pool, 1, sizeof(const char *));
>
usused variable paths.
> + svn_error_t *err;
> +
> + if (prop_kind != svn_prop_regular_kind)
> + return svn_error_createf
> + (SVN_ERR_BAD_PROP_KIND, NULL,
> + _("Property '%s' is not a regular property"), propname);
> +
> + /* Open an RA session for the URL. Note that we don't have a local
> + directory, nor a place to put temp files. */
> + SVN_ERR(svn_client__open_ra_session_internal(&ra_session, target,
> + NULL, NULL, NULL, FALSE, TRUE,
> + ctx, pool));
> +
> + SVN_ERR(svn_ra_check_path(ra_session, "", base_revision_for_url,
> + &node_kind, pool));
> + if (node_kind == svn_node_none)
> + return svn_error_createf
> + (SVN_ERR_FS_NOT_FOUND, NULL,
> + _("Path '%s' does not exist in revision %ld"),
> + target, base_revision_for_url);
> +
> + /* Setting an inappropriate property is not allowed (unless
> + overridden by 'skip_checks', in some circumstances). Deleting an
> + inappropriate property is allowed, however, since older clients
> + allowed (and other clients possibly still allow) setting it in
> + the first place. */
> + if (propval && svn_prop_is_svn_prop(propname))
> + {
> + const svn_string_t *new_value;
> + struct getter_baton *gb = apr_pcalloc(pool, sizeof(*gb));
> +
>
Why not this 'getter_baton' on stack? as its scoped to a smaller block?
> + gb->ra_session = ra_session;
> + gb->base_revision_for_url = base_revision_for_url;
> + SVN_ERR(svn_wc_canonicalize_svn_prop(&new_value, propname, propval,
> + target, node_kind, skip_checks,
> + get_file_for_validation, gb, pool));
> + propval = new_value;
> + }
> +
> + /* Create a new commit item and add it to the array. */
> + if (ctx->log_msg_func || ctx->log_msg_func2)
> + {
> + svn_client_commit_item2_t *item;
> + const char *tmp_file;
> + apr_array_header_t *commit_items
> + = apr_array_make(pool, 1, sizeof(item));
> +
> + item = apr_pcalloc(pool, sizeof(*item));
>
Could also be on the stack as its scope is in small block.
With regards
Kamesh Jayachandran
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r21887 - in trunk: . subversion/include subversion/libsvn_client subversion/svn subversion/tests/cmdline
Posted by David Glasser <gl...@mit.edu>.
On 10/25/06, Garrett Rooney <ro...@electricjellyfish.net> wrote:
> On 10/25/06, Paul Burba <pa...@softlanding.com> wrote:
> > Dave,
> >
> > The svn propedit PROPNAME URL functionality you introduced in r21887 isn't
> > working on Win32 over http:
> I'm seeing a failure on Linux:
Bah, I'll try to get apache tests working again on my box. (I
realized recently that my davautocheck was linking against my
installed libs instead of my trunk ones.)
--dave
--
David Glasser | glasser@mit.edu | http://www.davidglasser.net/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r21887 - in trunk: . subversion/include subversion/libsvn_client subversion/svn subversion/tests/cmdline
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/25/06, Paul Burba <pa...@softlanding.com> wrote:
> Dave,
>
> The svn propedit PROPNAME URL functionality you introduced in r21887 isn't
> working on Win32 over http:
>
>
>
> I it also fails on the command line, so the problem is not in the python
> tests:
>
> svn "proplist" -v
> "http://localhost/svn-test-work/repositories/prop_tests-1/A"
> Properties on
> 'http://localhost/svn-test-work/repositories/prop_tests-1/A':
> prop1 : propval1 is foo
> prop2 : propval2
>
> svn "propedit" "prop1"
> Release\subversion\tests\cmdline\svn-test-work\working_copies\prop_tests-1\A
> Set new value for property 'prop1' on
> 'Release\subversion\tests\cmdline\svn-test-work\working_copies\prop_tests-1\A'
>
> <set to new value "propval is lost" in my editor>
>
> svn "proplist" -v
> "http://localhost/svn-test-work/repositories/prop_tests-1/A"
> Properties on
> 'http://localhost/svn-test-work/repositories/prop_tests-1/A':
> prop1 : propval1 is foo
> prop2 : propval2
>
> I took a look but can't see what's wrong. But before I or anyone else
> goes too nuts looking, does url_props_ops pass for dav on other platforms?
I'm seeing a failure on Linux:
$ APXS=$HOME/code/scratch/apache20/bin/apxs ./davautocheck.sh prop 16
davautocheck.sh: Using '/home/rooneg/code/scratch/apache20/bin/apxs'...
davautocheck.sh: Using '/home/rooneg/code/scratch/apache20/bin/httpd'...
davautocheck.sh: Using '/home/rooneg/code/scratch/apache20/bin/htpasswd'...
davautocheck.sh: Using directory
'/home/rooneg/code/svn-trunk/subversion/tests/cmdline/httpd-20061025-132257'...
davautocheck.sh: Adding users for lock authentication
Adding password for user jrandom
Adding password for user jconstant
Syntax OK
davautocheck.sh: HTTPD started and listening on 'http://localhost:4195'...
davautocheck.sh: HTTPD is good, starting the tests...
EXPECTED STDOUT:
propval1 is bar
ACTUAL STDOUT:
propval1 is foo
EXCEPTION: SVNLineUnequal
FAIL: prop_tests.py 16: property operations on an URL
real 0m4.824s
user 0m1.460s
sys 0m0.436s
davautocheck.sh: Finished testing...
davautocheck.sh: Browse server error log (y/n)? [n]
davautocheck.sh: Delete HTTPD root directory (y/n)? [y]
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn commit: r21887 - in trunk: . subversion/include subversion/libsvn_client
subversion/svn subversion/tests/cmdline
Posted by Paul Burba <pa...@softlanding.com>.
Dave,
The svn propedit PROPNAME URL functionality you introduced in r21887 isn't
working on Win32 over http:
I it also fails on the command line, so the problem is not in the python
tests:
svn "proplist" -v
"http://localhost/svn-test-work/repositories/prop_tests-1/A"
Properties on
'http://localhost/svn-test-work/repositories/prop_tests-1/A':
prop1 : propval1 is foo
prop2 : propval2
svn "propedit" "prop1"
Release\subversion\tests\cmdline\svn-test-work\working_copies\prop_tests-1\A
Set new value for property 'prop1' on
'Release\subversion\tests\cmdline\svn-test-work\working_copies\prop_tests-1\A'
<set to new value "propval is lost" in my editor>
svn "proplist" -v
"http://localhost/svn-test-work/repositories/prop_tests-1/A"
Properties on
'http://localhost/svn-test-work/repositories/prop_tests-1/A':
prop1 : propval1 is foo
prop2 : propval2
I took a look but can't see what's wrong. But before I or anyone else
goes too nuts looking, does url_props_ops pass for dav on other platforms?
Paul B.