[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 - ls command

From: Julian Foad <julian.foad_at_wandisco.com>
Date: Tue, 09 Nov 2010 17:12:17 +0000

On Tue, 2010-11-09, Kamesh Jayachandran wrote:
> On 11/08/2010 11:59 AM, Noorul Islam K M wrote:
> > [[[
> > Canonicalize paths before passing them to svn_client_list2.
> >
> > * subversion/svn/list-cmd.c
> > (svn_cl__list): Canonicalize url or dirent before passing over to API.
> >
> > * subversion/tests/cmdline/basic_tests.py
> > (ls_url_special_characters, test_list): New test
> >
> > Patch by: Noorul Islam K M<noorul{_AT_}collab.net>
> > ]]]
> >
> Thanks Noorul. I tweaked for a cosmetic consistency and committed in
> r1033045.

Hi Noorul. These fixes are useful, but I can see a pattern emerging:
probably every time the command-line client calls svn_opt_parse_path(),
it is going to want the resulting "true path" to be canonicalized,
wither as a URL or as a WC path.

> Index: subversion/svn/list-cmd.c
> ===================================================================
>
> SVN_ERR(svn_opt_parse_path(&peg_revision, &truepath, target,
> subpool));
>
> + if (svn_path_is_url(truepath))
> + truepath = svn_uri_canonicalize(truepath, subpool);
> + else
> + truepath = svn_dirent_canonicalize(truepath, subpool);

So I think it would be good if you could create a function that
encapsulates the svn_opt_parse_path() and the new "if(url)..."
statements. It could be called svn_cl__parse_path(), and it could live
in subversion/svn/util.c.

Then the svn client code could call it instead of svn_opt_parse_path().

- Julian
Received on 2010-11-09 18:12:58 CET

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.