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

Re: Fix for issue 3609

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 2 Nov 2010 12:50:16 +0100

On Tue, Nov 02, 2010 at 04:05:32PM +0530, Noorul Islam K M wrote:
> "Bert Huijben" <bert_at_qqmail.nl> writes:
>
> >> -----Original Message-----
> >> From: Noorul Islam K M [mailto:noorul_at_collab.net]
> >> Sent: dinsdag 2 november 2010 11:08
> >> To: dev_at_subversion.apache.org
> >> Subject: [PATCH] Fix for issue 3609
> >>
> >>
> >> Log
> >>
> >> [[[
> >>
> >> Fix issue 3609: Canonicalize url
> >>
> >> * subversion/svn/info-cmd.c
> >> (svn_cl__info): Canonicalize url before passing over to API
> >>
> >> Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
> >>
> >> ]]]
> >
> > true_path can be a url or a local path. On Windows calling
> > svn_uri_canonicalize() breaks UNC paths like '//server/share/path'.
> >
> > I think the code could use a svn_path_is_url() call to check if the path is
> > a url before calling svn_uri_canonicalize().
> >
>
> Attached is the updated patch. No change in log message. Thank you for
> the comment.
>
> Thanks and Regards
> Noorul
>

This patch looks good to me.
We should consider renaming the variable -- e.g. 'canon_target' might
be a better name than 'truepath'.

Noorul, if you're looking for more tasks, you could take a look at
issue #3620 which is about a similar problem:
http://subversion.tigris.org/issues/show_bug.cgi?id=3620
I'll happily review and commit patches for issue #3620.

Thanks,
Stefan

> Index: subversion/svn/info-cmd.c
> ===================================================================
> --- subversion/svn/info-cmd.c (revision 1029983)
> +++ subversion/svn/info-cmd.c (working copy)
> @@ -538,6 +538,9 @@
> /* Get peg revisions. */
> SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target, subpool));
>
> + if (svn_path_is_url(truepath))
> + truepath = svn_uri_canonicalize(truepath, subpool);
> +
> /* If no peg-rev was attached to a URL target, then assume HEAD. */
> if (svn_path_is_url(target))
> {
Received on 2010-11-02 12:51:00 CET

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