diff options
author | peter <peter@FreeBSD.org> | 2014-05-27 04:55:31 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2014-05-27 04:55:31 +0000 |
commit | 9efa638bec6d135464ff9b3bab358c76671c87bf (patch) | |
tree | 6d1265a766b5c11e4c2414a994dbabb861526c73 /subversion/libsvn_client/prop_commands.c | |
parent | b168ae828108b6f3a7d68ace24b6e8383a081fb5 (diff) | |
download | FreeBSD-src-9efa638bec6d135464ff9b3bab358c76671c87bf.zip FreeBSD-src-9efa638bec6d135464ff9b3bab358c76671c87bf.tar.gz |
Vendor import svn-1.8.9
Diffstat (limited to 'subversion/libsvn_client/prop_commands.c')
-rw-r--r-- | subversion/libsvn_client/prop_commands.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/subversion/libsvn_client/prop_commands.c b/subversion/libsvn_client/prop_commands.c index a3e59c8..06c4d21 100644 --- a/subversion/libsvn_client/prop_commands.c +++ b/subversion/libsvn_client/prop_commands.c @@ -890,8 +890,14 @@ svn_client_propget5(apr_hash_t **props, const char *copy_root_abspath; svn_boolean_t is_copy; - SVN_ERR(svn_dirent_get_absolute(&local_abspath, target, - scratch_pool)); + /* Avoid assertion on the next line when somebody accidentally asks for + a working copy revision on a URL */ + if (svn_path_is_url(target)) + return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, + NULL, NULL); + + SVN_ERR_ASSERT(svn_dirent_is_absolute(target)); + local_abspath = target; if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind)) { @@ -1232,7 +1238,7 @@ recursive_proplist_receiver(void *baton, Report iprops anyway */ SVN_ERR(b->wrapped_receiver(b->wrapped_receiver_baton, - b->anchor ? b->anchor : local_abspath, + b->anchor ? b->anchor : b->anchor_abspath, NULL /* prop_hash */, b->iprops, scratch_pool)); @@ -1293,6 +1299,12 @@ get_remote_props(const char *path_or_url, const char *copy_root_abspath; svn_boolean_t is_copy; + /* Avoid assertion on the next line when somebody accidentally asks for + a working copy revision on a URL */ + if (svn_path_is_url(path_or_url)) + return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED, + NULL, NULL); + SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url, scratch_pool)); |