[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: Erik Huelsmann <ehuels_at_gmail.com>
Date: 2006-08-14 22:04:12 CEST

On 8/14/06, Lieven Govaerts <lgo@mobsol.be> wrote:
> Windows allows one to create virtual drives to folders. If you map a virtual
> drive to a working copy, so the working copy is on the root of that folder,
> Subversion will fail updating and committing that working copy. In fact,
> this issue is not dependent on using virtual drives, a working copy on the
> root of a physical drive or partition will show the same issue.

> This patch provides two fixes:

In that case, could you provide 2 patches? It's best to separate
conceptually different changes into separate commits.

> 1. Introduce 'X:/' as a syntax for a root folder, on Windows. I've
> encapsulated the check whether a path is a root folder in a new function
> svn_path_is_root. There's a number of direct comparisons between path and
> '/' throughout the code, so I've replaced them with a call to
> svn_path_is_root. While my tests point out that it now works correctly, I've
> might have missed some.


> 2. Fix an issue where Subversion thinks a working copy on a root path (both
> '/' and 'X:/') is switched. I'm pretty sure the old code couldn't work on
> unix either, probably no one has ever tested a working copy on '/'?

No, probably not :-)

Being on holidays (and thus writing this over dail-up), I've just
skipped over your commit message and not read the actual patch.
Comment(s) below.

> [[[
> Fix for issue #2556: on Windows, X:/ is a root folder, so whenever we check
> for the root folder, check for X:/ too.

For the first change this could say 'Prepare for fixing issue ...:
abstract root folder checks' or something like it.

> * subversion/include/svn_path.h
> (svn_path_is_root): New function declaration.
> * 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): Support the new type of root path on Windows, mostly by
> replacing direct comparisons of path and '/' with a call to
> svn_path_is_root.
> (svn_path_dirname): idem
> (svn_path_basename): idem

if 'idem' means 'the same as above', then that part would better read:
 (svn_path_join, svn_path_dirname,
  svn_path_basename): 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/libsvn_wc/status.c
> (assemble_status): add support for working copies at the root of a
> (virtual)
> drive. This is not Windows specific, this code didn't work for working
> copies on '/' either.

The remark about non-windows specificness could be placed on its own
line at the top of the message below the summary, that way, the reader
knows what to expect beforehand (at least, that's what I would do)

> * 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.
> ]]]



To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Aug 14 22:04:55 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.