[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-19 01:26:24 CEST

> -----Original Message-----
> From: Erik Huelsmann [mailto:ehuels@gmail.com]
> Sent: zaterdag 19 augustus 2006 0:01
..
> Well, if you check them for the expected value, it will give
> you an immediate exit from the comparison, so there's no real
> need to check them all for \0: if it's a null length string
> (""\0), the first char won't be in a-zA-Z, so that's where
> the comparison exits. Right where you want it.
>
I've updated the patch:
- a check that the first character of the path is in [a..z][A..Z] in
is_canonical and svn_path_is_root.
- return type of svn_path_is_root changed from int to svn_boolean_t.

Both patches are added (the 'wc is switched' patch isn't changed).

> > int svn_path_is_empty(const char *path);
> > which returns either 1 or 0. You know why we use the 'int' there?
>
> No idea, probably history. I think it's an error we didn't
> see before releasing 1.0...

I'll send a patch for this to the list tomorrow.

Thanks for the review,

Lieven.

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

* 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, 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_is_root.
  (svn_path_canonicalize): don't strip the trailing slash if the path is
   of the 'X:/' syntax.

* 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
(virtual)
   drive.
]]]

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

Received on Sat Aug 19 01:28:09 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.