[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 #2556: support working copies on the root of a (virtual) drive

From: Lieven Govaerts <lgo_at_mobsol.be>
Date: 2006-08-21 01:07:59 CEST

Attached is a new version of these patches. It's based on the remarks all of
you made the previous days.

Changes compared to the previous version include:
- use apr's apr_filepath_root for a portable way to determine if a path is a
root path.
- an expanded python test so more problem cases could be solved
- unit tests (test_path) to validate the changes in the svn_path functions.

The 'working copy is switched' is unchanged compared to previous version.

As I said before, there are probably other scenario's of using wc's on root
folders we can find that won't work with current patch. I'll try to find
these scenario's, add them to the python tests and fix the issues in the
coming days/weeks.

> -----Original Message-----
> From: Philip Martin [mailto:philip@codematters.co.uk]
> Sent: maandag 21 augustus 2006 0:00
> Lieven Govaerts <lgo@mobsol.be> writes:
> > However, there's another reason why I create a subpool. The function
> > is_canonical (private function in path.c) is calling svn_path_is_root,
> > but that function doesn't have a pool available and is called by other
> > functions which don't have pool parameters.
> Perhaps it's time to get rid of is_canonical? I added it
> when I was attempting to catch the places where the svn
> client was not passing canonical paths, it was cheap and
> efficient so I just scattered it through the path code. If
> it's not removed then it's use could be restricted to those
> places that do have pools.
I have no opinion on this suggestion, except that it doesn't solve the
problem with the temporary pool, as there are other public functions in
path.c that don't have a pool available.


Prepare fix for issue #2556: abstract root folder checks in
Add support for 'X:/' as a root folder on Windows.

* subversion/include/svn_path.h
  (svn_path_is_root): New function declaration.
  (svn_path_is_empty): Added comment.

* subversion/libsvn_client/commit.c
  (svn_client_commit4): make sure to abort when the iterating through the
   parent folders passese the root folder.

* subversion/libsvn_subr/path.c
  (svn_path_is_root): New function. Tests for either '/' on all platforms
   or 'X:/' on Windows.
  (is_canonical): 'X:/' syntax on Windows is canonical.
  (svn_path_join, svn_path_dirname, svn_path_basename,
   svn_path_join_many, previous_segment,
   get_path_ancestor_length): Support the new type of root path on Windows,
    mostly by replacing direct comparisons of path and '/' with a call to
  (svn_path_canonicalize): don't strip the trailing slash if the path is
   of the 'X:/' syntax.

* subversion/tests/libsvn_subr/path-test.c
  (test_is_root): New test for validation of svn_path_is_root.
  (test_path_split, test_join,
   test_basename, test_remove_component): add extra cases for 'X:/'.
  (test_funcs): run the new test test_is_root.

* subversion/tests/cmdline/update_tests.py
  (update_wc_on_windows_drive): New test for issue 2556.
  (test_list): add the new test to the list.

Fix an issue where the status of a working copy on the root of a drive is
'S' (switched), as part of issue #2556.
This is not Windows specific, this code didn't work for working copies on
'/' either.

* subversion/libsvn_wc/status.c
  (assemble_status): add support for working copies at the root of a

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Mon Aug 21 01:10:10 2006

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.