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

Re: [PATCH] Fix for issue 3826

From: Daniel Becroft <djcbecroft_at_gmail.com>
Date: Thu, 3 Mar 2011 06:16:15 +1000

On Thu, Mar 3, 2011 at 3:34 AM, Noorul Islam K M <noorul_at_collab.net> wrote:

>
> Please find attached patch for issue 3826. All tests pass using 'make
> check'
>

Hey Noorul,

I had a quick look at this issue last night. It appears a similar issue
exists for almost every command (I checked 'info', 'status' and 'update').

Cheers,
Daniel B.

> Log
> [[[
>
> Fix for issue 3826. Make svn diff respect absolute paths. Also fix
> corresponding test.
>
> * subversion/svn/diff-cmd.c
> (svn_cl__diff): Do not convert absolute path into relative one.
>
> * subversion/tests/cmdline/diff_tests.py
> (diff_abs_localpath_from_wc_folder): Fix test to use correct absolute
> path. Remove XFail marker.
>
> Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
> Found by: danielsh
> ]]]
>
>
> Index: subversion/tests/cmdline/diff_tests.py
> ===================================================================
> --- subversion/tests/cmdline/diff_tests.py (revision 1076214)
> +++ subversion/tests/cmdline/diff_tests.py (working copy)
> @@ -3761,7 +3761,6 @@
> '-c2', '--git')
> os.chdir(was_cwd)
>
> -_at_XFail()
> @Issue(3826)
> def diff_abs_localpath_from_wc_folder(sbox):
> "diff absolute localpath from wc folder"
> @@ -3770,9 +3769,10 @@
>
> A_path = os.path.join(wc_dir, 'A')
> B_path = os.path.join(wc_dir, 'A', 'B')
> + B_abspath = os.path.abspath(B_path)
> os.chdir(os.path.abspath(A_path))
> svntest.actions.run_and_verify_svn(None, None, [], 'diff',
> - os.path.abspath(B_path))
> + B_abspath)
>
> ########################################################################
> #Run the tests
> Index: subversion/svn/diff-cmd.c
> ===================================================================
> --- subversion/svn/diff-cmd.c (revision 1076214)
> +++ subversion/svn/diff-cmd.c (working copy)
> @@ -324,8 +324,11 @@
> return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
> _("Path '%s' not relative to base
> URLs"),
> path);
> + if (! svn_dirent_is_absolute(path))
> + path = svn_relpath_canonicalize(path, iterpool);
> + else
> + path = svn_dirent_canonicalize(path, iterpool);
>
> - path = svn_relpath_canonicalize(path, iterpool);
> if (svn_path_is_url(old_target))
> target1 = svn_path_url_add_component2(old_target, path,
> iterpool);
> else
>
>
Received on 2011-03-02 21:17:24 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.