Author: julianfoad
Date: Tue Jun 28 17:10:44 2011
New Revision: 1140729
URL: http://svn.apache.org/viewvc?rev=1140729&view=rev
Log:
Revert several attempts to fix non-canonical paths in the command-line
client. Additional canonicalization had been added in an attempt to fix
issue #3609, "Assertion in svn_path_is_canonical, svn_path_join with 'file:'
URL". However, the cause was actually a problem with the URL
canonicalization function itself; see r1068476 and possibly other fixes.
As well as removing some long-standing canonicalizations, this reverts the
main changes in the following commits, but does not remove the tests that
these added: r1030010 (svn info), r1033028 (svn cat), r1033045 (svn list),
r1033411 (svn_cl__opt_parse_path).
* subversion/svn/cl.h,
subversion/svn/util.c
(svn_cl__opt_parse_path): Remove.
* subversion/svn/cat-cmd.c
(svn_cl__cat): s/svn_cl__opt_parse_path/svn_opt_parse_path/.
* subversion/svn/list-cmd.c
(svn_cl__list): Same.
* subversion/svn/checkout-cmd.c
(svn_cl__checkout): Don't canonicalize the output of svn_opt_parse_path().
* subversion/svn/info-cmd.c
(svn_cl__info): Same.
* subversion/svn/switch-cmd.c
(svn_cl__switch): Don't canonicalize the switch URL.
Modified:
subversion/trunk/subversion/svn/cat-cmd.c
subversion/trunk/subversion/svn/checkout-cmd.c
subversion/trunk/subversion/svn/cl.h
subversion/trunk/subversion/svn/info-cmd.c
subversion/trunk/subversion/svn/list-cmd.c
subversion/trunk/subversion/svn/switch-cmd.c
subversion/trunk/subversion/svn/util.c
Modified: subversion/trunk/subversion/svn/cat-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cat-cmd.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cat-cmd.c (original)
+++ subversion/trunk/subversion/svn/cat-cmd.c Tue Jun 28 17:10:44 2011
@@ -30,6 +30,7 @@
#include "svn_pools.h"
#include "svn_client.h"
#include "svn_error.h"
+#include "svn_opt.h"
#include "cl.h"
#include "svn_private_config.h"
@@ -72,8 +73,8 @@ svn_cl__cat(apr_getopt_t *os,
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
/* Get peg revisions. */
- SVN_ERR(svn_cl__opt_parse_path(&peg_revision, &truepath, target,
- subpool));
+ SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
+ subpool));
SVN_ERR(svn_cl__try(svn_client_cat2(out, truepath, &peg_revision,
&(opt_state->start_revision),
Modified: subversion/trunk/subversion/svn/checkout-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/checkout-cmd.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/checkout-cmd.c (original)
+++ subversion/trunk/subversion/svn/checkout-cmd.c Tue Jun 28 17:10:44 2011
@@ -136,8 +136,6 @@ svn_cl__checkout(apr_getopt_t *os,
SVN_ERR(svn_opt_parse_path(&peg_revision, &true_url, repos_url,
subpool));
- true_url = svn_uri_canonicalize(true_url, subpool);
-
/* Use sub-directory of destination if checking-out multiple URLs */
if (targets->nelts == 1)
{
Modified: subversion/trunk/subversion/svn/cl.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/cl.h?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/cl.h (original)
+++ subversion/trunk/subversion/svn/cl.h Tue Jun 28 17:10:44 2011
@@ -811,13 +811,6 @@ svn_cl__eat_peg_revisions(apr_array_head
const apr_array_header_t *targets,
apr_pool_t *pool);
-/* Like svn_opt_parse_path(), but canonicalizes dirent/URL */
-svn_error_t *
-svn_cl__opt_parse_path(svn_opt_revision_t *rev,
- const char **truepath,
- const char *path,
- apr_pool_t *pool);
-
/* Return an error if TARGETS contains a mixture of URLs and paths; otherwise
* return SVN_NO_ERROR. */
svn_error_t *
Modified: subversion/trunk/subversion/svn/info-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/info-cmd.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/info-cmd.c (original)
+++ subversion/trunk/subversion/svn/info-cmd.c Tue Jun 28 17:10:44 2011
@@ -579,15 +579,11 @@ svn_cl__info(apr_getopt_t *os,
/* If no peg-rev was attached to a URL target, then assume HEAD. */
if (svn_path_is_url(truepath))
{
- truepath = svn_uri_canonicalize(truepath, subpool);
-
if (peg_revision.kind == svn_opt_revision_unspecified)
peg_revision.kind = svn_opt_revision_head;
}
else
{
- truepath = svn_dirent_canonicalize(truepath, subpool);
-
SVN_ERR(svn_dirent_get_absolute(&truepath, truepath, subpool));
}
Modified: subversion/trunk/subversion/svn/list-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/list-cmd.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/list-cmd.c (original)
+++ subversion/trunk/subversion/svn/list-cmd.c Tue Jun 28 17:10:44 2011
@@ -30,6 +30,7 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_utf.h"
+#include "svn_opt.h"
#include "cl.h"
@@ -270,8 +271,8 @@ svn_cl__list(apr_getopt_t *os,
SVN_ERR(svn_cl__check_cancel(ctx->cancel_baton));
/* Get peg revisions. */
- SVN_ERR(svn_cl__opt_parse_path(&peg_revision, &truepath, target,
- subpool));
+ SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
+ subpool));
if (opt_state->xml)
{
Modified: subversion/trunk/subversion/svn/switch-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/switch-cmd.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/switch-cmd.c (original)
+++ subversion/trunk/subversion/svn/switch-cmd.c Tue Jun 28 17:10:44 2011
@@ -138,8 +138,6 @@ svn_cl__switch(apr_getopt_t *os,
SVN_ERR(svn_cl__check_target_is_local_path(target));
- switch_url = svn_uri_canonicalize(switch_url, scratch_pool);
-
/* Deal with depthstuffs. */
if (opt_state->set_depth != svn_depth_unknown)
{
Modified: subversion/trunk/subversion/svn/util.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1140729&r1=1140728&r2=1140729&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Tue Jun 28 17:10:44 2011
@@ -1361,22 +1361,6 @@ svn_cl__eat_peg_revisions(apr_array_head
}
svn_error_t *
-svn_cl__opt_parse_path(svn_opt_revision_t *rev,
- const char **truepath,
- const char *path /* UTF-8! */,
- apr_pool_t *pool)
-{
- SVN_ERR(svn_opt_parse_path(rev, truepath, path, pool));
-
- if (svn_path_is_url(*truepath))
- *truepath = svn_uri_canonicalize(*truepath, pool);
- else
- *truepath = svn_dirent_canonicalize(*truepath, pool);
-
- return SVN_NO_ERROR;
-}
-
-svn_error_t *
svn_cl__assert_homogeneous_target_type(const apr_array_header_t *targets)
{
svn_error_t *err;